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
Dir["*.avi"].sort.map{|s| [Dir["*#{s.scan(/\dx\d\d/)}*srt"].first, s.gsub(/avi$/,"srt")]}.each{|a| FileUtils.mv a.first, a.last} |
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
mysql> show indexes in activities; | |
mysql> EXPLAIN SELECT * FROM 'users'; |
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
sudo apt-get install apache2.2-bin libapache2-mod-dnssd gnome-user-share | |
bluetooth-applet | |
Left Click => "Preferences" => "Receive Files" |
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
ActiveRecord::ConnectionAdapters::Column.value_to_boolean(parameter) |
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
" search across files in vim | |
:lgrep -r pattern dir_1 dir_2 | |
:lopen | |
" go to next file | |
:lnf | |
" go to next or previous match | |
:lnext | |
:lprev |
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
# http://forum.xda-developers.com/showthread.php?t=788108 | |
unzip CF-Root-XX_OXA_JVP-v3.7-CWM3RFS.zip | |
tar xvf CF-Root-XX_OXA_JVP-v3.7-CWM3RFS.tar | |
# Put phone in download mode | |
heimdall flash --kernel zImage | |
cp CF-Root-ext4-v1.3-Addon.apk /media/phone/ |
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 "#{Rails.root}/lib/yourfile.rb" |
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
cp 1 my_file.pptx | |
for N in {2..15}; do xdelta3 -f -d -s my_file.pptx $N my_file.pptx; done |
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
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile | |
source ~/.bash_profile | |
# You might not need this | |
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz | |
tar xzvf readline-6.1.tar.gz | |
cd readline-6.1 | |
./configure --prefix=$HOME/readline | |
make |
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
# Let's break MVC! | |
include ActionController::UrlWriter | |
self.class.default_url_options = {:host => "localhost"} | |
home_url |
OlderNewer