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
| How to turn off the iMac display | |
| CONTROL + SHIFT + EJECT |
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
| You can use sprintf-like formatting to inject values into the string. For that the string must include placeholders. Put your arguments into an array and use on of these ways: (For more info look at the documentation for Kernel::sprintf.) | |
| fmt = 'The %s %s the %s' | |
| res = fmt % [animal, action, other_animal] # using %-operator | |
| res = sprintf(fmt, animal, action, other_animal) # call Kernel.sprintf | |
| You can even explicitly specify the argument number and shuffle them around: | |
| 'The %3$s %2$s the %1$s' % ['cat', 'eats', 'mouse'] | |
| Or specify the argument using hash keys: |
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
| sunucu restart | |
| sudo /etc/init.d/apache2 restart | |
| domain | |
| cd /etc/apache2/sites-available/ | |
| sudo a2dissite default | |
| sudo a2ensite xxxxx.com |
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
| local to remote | |
| scp -i ~/.ssh/supernomads.pem supernomads.com.crt [email protected]:~/. | |
| ~/.ssh klasöründeyken | |
| rsync -avL --progress -e "ssh -i ./supernomads.pem" ~/Downloads/kibo_image/* [email protected]:/tmp/. | |
| rsync -rave "ssh -i ./supernomads.pem" ~/Downloads/kibo_image/* [email protected]:/tmp/. | |
| remote to local | |
| scp -r [email protected]:/path/to/foo /home/user/Desktop/ |
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
| rspec spec --format nested. |
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
| # Filter payment methods in Spree depending on the shipping name, | |
| # use the following snippet within your activation method to | |
| # make it work: | |
| # | |
| # CheckoutsController.class_eval { include FilterPaymentMethods } | |
| # | |
| # The magic happens within the InstanceMethods module, change the | |
| # regexp to fit your needs. | |
| # | |
| # Kai Krakow, http://github.com/kakra |
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
| Git Config | |
| Check your Git configuration parameters: | |
| $ git config -l --global | |
| user.name=Daniel Kehoe | |
| [email protected] | |
| The email address will identify you to any services that use your Git repo, such as GitHub and Heroku. | |
| Life will be easier if you use the same email address for all services where you use Git (so sign up for GitHub and Heroku using the same address). |
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
| Local SSH public keyi sunucuya eklemek. Sunucuya şifresiz bağlanabiliriz. | |
| cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' |
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
| I'm in Lion | |
| with iTerm2, Zsh and Oh-My-Zsh | |
| but I cannot move through words when pressing: ALT+left arrow or CMD+left arrow or something | |
| instead, when I press "ALT+right arrow" it prints [C and when I press "SHIFT+ALT+left arrow" it prints D0 | |
| how I can config iTerm2 to behave like any other program when moving through words? | |
| ********* |
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
| set :unicorn_port, 5087 | |
| namespace :foreman do | |
| desc "Export the Procfile to Ubuntu's upstart scripts" | |
| task :export do | |
| on roles(:app) do | |
| within current_path do | |
| execute :rbenv, :sudo, "foreman export upstart /etc/init --procfile=./Procfile -a #{fetch(:application)} -p #{fetch(:unicorn_port)} -u #{fetch(:user)} -l #{shared_path}/log" | |
| end |
OlderNewer