...of lessons that you finished. This way you get periodic updates about your progress. Order of lessons Work through the cards in the listed order. When you're finished with...
Use rules to include or exclude jobs in pipelines. Rules are evaluated in order until the first match. When a match is found, the job is either included or excluded...
In order to have more human readable git branches, do git pull --rebase To always pull like this, write these lines to your ~/.gitconfig: [pull] rebase = true
...existing rows with ascending numbers. Furthermore these numbers should be generated by a special order. In order to achieve that you could do the following: execute "SET @pos := 0;"
...UPDATE pages SET position = ( SELECT @pos := @pos + 1 ) ORDER BY updated_at DESC...
...after pagination: # does not work @contracts = @contracts.reject {...} # works @contracts.reject! {...} YAML fixes Change # old date: order: [ :day, :month, :year ] # new date: order: - :year - :month - :day Also see Upgrade from Ruby...
...Many times you would use scope options, like this: users = User.scoped( :joins => 'INNER JOIN orders joined_orders ON users.id = joined_orders.user_id', :conditions => [ 'joined_orders.date BETWEEN ? AND ?', start_date, end_date ],
...user IDs by selecting only from the users table: users = User.scoped( :joins => 'INNER JOIN orders joined_orders ON users.id = joined_orders.user_id', :conditions => [ 'joined_orders.date BETWEEN ? AND ?', start_date, end_date ],
Let's say you have two XML strings that are ordered differently but you don't care about the order of attributes inside containers: a = ' batman secret ' b = ' secret batman...
xml_parser.parse(a) => {:authenticate=>{:user=>"batman", :password=>"secret"}} xml_parser.parse(a) == xml_parser.parse(b) => true Note: order in XML can be important (e.g. XHTML). For cases where it's not, you can...
...necessarily) only happen when trying to update or otherwise lock several rows in different order. Solving deadlocks is potentially complicated, so here are a few pointers: MySQL should always detect...
...the necessary parameters instead. that is for example caused by url_for( :overwrite_params => { :order => 'name', :dir => 'asc' } ) you can fix this by using params.merge {:my_param_to_overwrite => 'foo...
...To fix the example above the code could look like: url_for( params.merge { :order => 'name', :dir => 'asc' } ) Note: link_to uses url_for internally, so you can can use params.merge...
...special tag message" A normal git push will not push the tag. So in order to publish your (local) tags, you have to git push --tags Check if a tag...
...with two bundlers being loaded (an old one and a new one, in that order, doesn't work well). https://github.com/phusion/passenger/issues/2409#issuecomment-1029361123
Stick.shuffled.first Or, if you prefer something smaller: class Stick named_scope :shuffled, :order => 'RAND()' end Note however that you should never order by RAND() on tables that may...
...the certificate. It's also possible that the certificate chain is in the wrong order. Make sure that the server certificate is the first. This is also necessary for nginx...
...t magically load themselves from disk. Production All files are loaded in a deterministic order once the server boots. Take this example with some constants referencing each other: # app/models/contract/document/uploader.rb
...Document::Uploader. In development this can happen randomly, as you never know in which order the files are autoloaded. If the autoload mechanism has already loaded app/models/document/uploader.rb, a constant lookup...
...In most cases it is sufficient to delete and recreate the local database in order to import the dump. If any problems occur, proceed as follows: 1. Figure out the...
...If you use the ARRAY[] syntax, you'll need to add a type in order to perform operations with e.g. a string array column: ARRAY['one', 'two']::varchar[].
...always bypass the pre-commit hook by committing with the --no-verify option.) In order to have git fix whitespace on lines you edited before each commit, append the following...
...is installed (locally, don't put it into your Gemfile). Run geordi commit in order to set up API access for Pivotal Tracker. Put the tracker_api Gem into your...
...configuration) at some point Capistrano tries to check out code from your repository. In order to do so, Capistrano connects to your repository server from the application server you're...
Ruby offers monkey patching methods in order to change the behavior of a library if there's no better way. We can call the method we're overriding inside our...
...seconds. You probably want to reduce these numbers significantly in order to detect dead connections in a timely fashion, but you can do this in your application code (no need...
...immune_method_1(**$hash) immune_method_2(**$hash) immune_method_3(**$hash) puts '', 'Hash order does not matter:' inversed_hash = Hash[$hash.to_a.reverse] vulnerable_method_1(inversed_hash) vulnerable_method...
...will deny access after 5 attempts. This issue might come and go as the order of the active SSH keys in your ssh-agent changes. Quick fix Have less keys...
...monitor a connection from your machine to a specific, single host or network in order to identify which network hop between your machine and the target causes trouble. You can...