- Stack and Heap
- Ownership concepts
- Borrowing
- Expressions vs Statements
- traits (and Drop trait in particular)
- deep dive on memory allocation - ext
- Documentation section and documentation tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Simple wget grab-and-parse snippet | |
| # By courtesy of Mikhail Zhuravlev ([email protected]) | |
| # Grab all .html and .htm files up to level 4 | |
| wget -nc --random-wait -r --level 4 --accept .html .htm http://URL | |
| # Search for matching pattern, write to text file | |
| grep -Hir --include=*.{html,htm} 'pattern' . > filename.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server | |
| { | |
| ... | |
| # unless the request is for a valid file, send to bootstrap | |
| # (taken from awesome guide http://www.farinspace.com/wordpress-nginx-rewrite-rules/) | |
| if (!-e $request_filename) | |
| { | |
| rewrite ^(.+)$ /index.php?q=$1 last; | |
| } |
How to configure directory accessible by both FTP user and a webserver running under Debian?
In order to do this, we will need three things:
- Configure
vsftpdto work with separate user configurations - Set correct permissions for directories accessible via FTP
- Turn off SSH access for FTP users
You can also jump to working production configuration attached below.
Use here_document with class_eval to simplify debugging:
class_eval <<-"end_eval", __FILE__, __LINE__
def #{block_accessor}(*args, &block)
unless args.empty? && block.nil?
args.push block if block_given?
@#{block_accessor} = [args].flatten
end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # enable git prompt extension | |
| source ~/.git-prompt.sh | |
| ## | |
| # Set prompt colors | |
| LIGHT_GRAY="\[\033[1;30m\]" | |
| LIGHT_YELLOW="\[\033[0;33m\]" | |
| LIGHT_GREEN="\[\033[0;32m\]" | |
| NO_COLOUR="\[\033[0m\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <HTML> | |
| <HEAD> | |
| <TITLE> Chrome Frame Test </TITLE> | |
| </HEAD> | |
| <BODY> | |
| <object id="ChromeFrame" width="100%" height="100%" | |
| codebase="http://www.google.com" | |
| classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> | |
| <param name="src" value="<% request.getContextPath(); %>"> | |
| <embed id="ChromeFramePlugin" name="ChromeFrame" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load 'deploy/assets' | |
| namespace :deploy do | |
| namespace :assets do | |
| desc 'Run the precompile task locally and rsync with shared' | |
| task :precompile, :roles => :web, :except => { :no_release => true } do | |
| %x{bundle exec rake assets:precompile} | |
| %x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}} | |
| %x{bundle exec rake assets:clean} | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then | |
| source "$rvm_path/scripts/rvm" | |
| source ".rvmrc" | |
| fi |
NewerOlder