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
| # https://rvm.beginrescueend.com/integration/capistrano/ | |
| # sudo and scons must be installed even though i don't want to use sudo at all. And i don't change user. | |
| # also for git clone to work i have to set up ssh key in .ssh | |
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
| require "rvm/capistrano" # Load RVM's capistrano plugin. | |
| set :rvm_ruby_string, 'ruby-1.9.2@rails31' # Or whatever env you want it to run in. | |
| set :rvm_type, :user # Copy the exact line. I really mean :user here | |
| #http://blog.josephholsten.com/2010/09/deploying-with-bundler-and-capistrano/ | |
| require 'bundler/capistrano' |
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://overlays.gentoo.org/proj/sunrise |
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
| To set up search history backward in inputrc add these settings: | |
| This will add you ctrl + up and ctrl + down to complete command partial. But if you change your mind and want to jump different command you can simply do it by using up and down without the ctrl. | |
| /etc/inputrc: | |
| "\e[1;5A": history-search-backward | |
| "\e[1;5B": history-search-forward | |
| http://www.linuxquestions.org/questions/linux-desktop-74/how-to-search-command-history-beginning-with-what-you-type-789471/ | |
| http://forums.opensuse.org/archives-software/337292-trivial-bash-question.html |
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://nathanhoad.net/how-to-delete-a-remote-git-tag | |
| #remote | |
| git tag -d 12345 | |
| git push origin :refs/tags/12345 | |
| #local | |
| git tag -d v0.2_cucumber |
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
| 'gem list | cut -d" " -f1 | xargs gem uninstall -aIx' | |
| # vagy | |
| for I in $(gem list | cut -d" " -f1); do gem uninstall -aIx $I; 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
| /* http://flydillonfly.wordpress.com/2011/05/06/writing-oo-javascript-using-jquery/ */ | |
| var Flat = function () {}; | |
| Flat.prototype = { | |
| initialize: function () { | |
| $("#myButton").click($.proxy(this.displayMessage, this)) | |
| }, | |
| add: function(e) { | |
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
| SELECT column_name, data_type, udt_name, character_maximum_length FROM information_schema.columns WHERE table_name = 'table'; |
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
| # source: http://stackoverflow.com/questions/953481/restore-a-deleted-file-in-a-git-repo | |
| Use git log --diff-filter=D --summary to get all the commits which have deleted files and the files deleted; | |
| Use git revert $commit to revert that particular commit. | |
| Using --summary instead of --name-only displays the actions taken. | |
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
| https://gist.github.com/983588 | |
| #Put this in application.rb, or in a rake task initialize code | |
| if defined?(Rails) && (Rails.env == 'development') | |
| Rails.logger = Logger.new(STDOUT) | |
| 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
| A postgresql klien library -k mindenképp kellettek ahhoz 1.9.2 alatt jó legyen a db karakter kódólás | |
| A postgresql-base -t kellett telepíteni ahhoz, hogy a pg gem jól működjön ruby 1.9.2 alatt és rendesen kezelje az utf-8 karaktereket. | |
| Utána letöröltem a pg -t és újra installáltam gem install -al. Nem biztos, hogy ez a lépés is kellett de ártani nem ártahat. | |
| Error 'incompatible character encodings: ASCII-8BIT and UTF-8' with Rails 3.0.5 and Ruby 1.9.2p136 |