Assuming you're wanting to undo the effects of git rm or rm followed by git add -A or something...
...that were modified in the last 24 hours you can do this: find . -mtime 1 You can also refer to another file's timestamp like this: find . -cnewer other_file...
...for a control to respond to touch commands. This is true for both iPad 1 and iPad 2 models. While certain CSS styles can lead to performance issues, removing those...
...upgrade RVM it has a hardcoded notion which patch level it considers to be "1.9.3". This can give you errors like "ruby-1.9.3-p392 is not installed" even if you...
...have another Ruby 1.9.3 that will do. The solution is to define an alias: rvm alias create 1.9.3 ruby-1.9.3-p385 Fuzzy matching Another solution is to use rvm with...
...a fixed number. #!/usr/bin/env bash interface=eth0 dumpdir=/tmp/ packet_threshold=5000 log_packets=100000 while /bin/true; do pkt_old=`grep $interface: /proc/net/dev | cut -d : -f2 | awk '{ print $2 }'`
pkt_new=`grep $interface: /proc/net/dev | cut -d : -f2 | awk '{ print $2 }'` pkt=$(( $pkt_new - $pkt_old )) echo -ne "\r$pkt packets/s\033[0K" if [ $pkt -gt $packet_threshold ]; then...
While RSpec 1 and 2 decided that specs inside spec/model are model specs, and those inside spec/features are feature specs (and so on), RSpec 3 will no longer do that...
...main() in -lc... yes creating Makefile ... cc1: all warnings being treated as errors Makefile:150: recipe for target 'gherkin_lexer_ar.o' failed make: *** [gherkin_lexer_ar.o] Error 1 ...
In Ruby 1.9, instance_eval calls the block the with receiver as the first argument: In Ruby 1.8, receiver.instance_eval(&block) calls block.call() In Ruby 1.9, receiver.instance_eval(&block) calls...
...block.call(receiver) This will blow up in your face in Ruby 1.9, where a lambda crashes when it is called with a different number of arguments: wrong number of arguments...
...cast strings into their respective types like this: Note.columns_hash['user_id'].type_cast('123') # => 123 Note.columns_hash['deleted'].type_cast('1') # => true Note.columns_hash['deleted'].type_cast('0') # => false
...Button Sound”; the “Power Save Audio” entry is usually grayed out, so this is 1 beep less than from above.) Right Down Tick Do it this way or your colleagues...
...will stand at your desk after the 12th beep, ready to smack you...
...s the default for switching input languages (i.e. keyboard layouts). If you use only 1 language/layout, you will not notice except for the key not working.
...ibus-setup (e.g. from a terminal). This will open a GUI dialog. In the 1st tab you should see "Next Input Method" followed by " space". Click the "..." button on the...
From Ubuntu 17, rbenv fails to install Ruby below 2.4 because of a mismatching OpenSSL dependency: it needs libssl1.0-dev for the installation process, but recent Ubuntus come with libssl-dev...
...instead of the current upstream version (which is 7). Install Ruby like this: # Ruby 1.8.7 apt install libssl1.0-dev # This will remove libssl-dev CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline --with...
If you get a message like this: Jan 21 13:42:38 foobar syslogd: /var/log/authlog : no such file or directory But you are sure the file exists and it have...
...the correct permissions: # example for Solaris 9 -rw-r--r-- 1 root sys 8,0K 21. Jan 13:51 /var/log/authlog Then you perhaps have a trailing whitespace after /var/log/authlog in...
Follow the instructions here. PRs at makandra/rubocop-config are welcome. Also check the issue tracker. RubyMine Since version 2017-1 RubyMine...
...with each option explained. About Hello, This site contains 29761 parsed manpages from sections 1 and 8 found in Ubuntu's manpage repository. A lot of heuristics were used to...
...will open an debugging IRB right away, like this: require File.dirname(__FILE__) + '/../config/boot' (rdb:1) _ Enter c to continue and reach your actual debugger call. Then, debug away.
...can feed it to block-taking methods by prefixing it with &: printer = method(:puts) [1, 2, 3].each(&printer) # will print one line per number
stats = {} ObjectSpace.each_object {|o| stats[o.class].nil? ? stats[o.class] = 0 : stats[o.class] += 1 }; stats => {String=>192038, Array=>67690, Time=>2667, Gem::Specification=>2665, Regexp=>491, Gem::Requirement=>16323...
Make sure the daemon is running. Error: Process /usr/lib/sflphone/sflphoned exited with status 1 This mean the last process didn't shut down properly and let a PID file...
...If you've shut sflphone down some seconds ago, you just have to wait 10 seconds and don't have to remove the pid file manually...
...and no special hardware. On our production frontend machines, SSL/TLS accounts for less than 1% of the CPU load, less than 10KB of memory per connection and less than...
...due to a conflict, for example), you may want to know the current commit. [1]\ Luckily, there is lots of useful stuff in the .git directory. Commit hash that you...
...Handy when you want to look at that branch's state of the file. [1] While git shows the commit when stopping at conflicts, for example, that information may have...
...With a block, it counts the number of elements yielding a truthy value. ary = [1, 2, 4, 2] ary.count #=> 4 ary.count(2) #=> 2 ary.count { |x| x...
The following snippet will convert a string with wildcards to a appropriate regexp, i.e. parse_wildcards("foobar") # => /\Afoo.bar\z/
execute "SET @pos := 0;" update " UPDATE pages SET position = ( SELECT @pos := @pos + 1 ) ORDER BY updated_at DESC...