I hereby claim:
- I am gedrovits on github.
- I am gedrovits (https://keybase.io/gedrovits) on keybase.
- I have a public key whose fingerprint is 93E6 4EED D8DF 67EA 5838 86AA CE41 332C AEEB 5145
To claim this, I am signing this object:
| # Source: http://www.zhuwu.me/blog/posts/solve-gem-installation-timeout-when-building-docker-image | |
| N=0 | |
| STATUS=1 | |
| until [ ${N} -ge 5 ] | |
| do | |
| bundle install --without development test --jobs 4 --deployment && STATUS=0 && break | |
| echo 'Try bundle again ...' | |
| N=$[${N}+1] | |
| sleep 1 | |
| done |
I hereby claim:
To claim this, I am signing this object:
| # Rebuild Task | |
| # @authors Vjatseslav Gedrovits, Irina Shumilova | |
| # @license MIT | |
| namespace :db do | |
| desc 'Drop, create, migrate, seed the database with prompt.' | |
| task rebuild: [:environment, :production_protection, :internal_metadata_check] do | |
| puts 'Database rebuild process started...' | |
| $stdout.puts 'Drop old database? (y/n)' | |
| if $stdin.gets.strip == 'y' |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
| # Rebuild Task | |
| # @author Vjatseslav Gedrovits | |
| # @license MIT | |
| namespace :db do | |
| desc 'Drop, create, migrate, seed the database with prompt.' | |
| task rebuild: [:environment, :production_protection] do | |
| puts 'Database rebuild process started...' | |
| $stdout.puts 'Drop old database? (y/n)' | |
| if $stdin.gets.strip == 'y' |
| # Copy the gem location to clipboard | |
| bundle show yajl-ruby | pbcopy | |
| # Example: /Users/gedrovits/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/yajl-ruby-0.8.2 | |
| cd <cmd + v> | |
| cd ext/yajl | |
| # Now we need to replace 'inline void' to 'static void'. This will also create backup of old files. | |
| sed -i '.bak' 's/inline void/static void/g' yajl_ext.h yajl_ext.c | |
| # Now we must rebuild changed extension | |
| make clean all | |
| # After this you should not have any problems with yajl-ruby |
| -# shared/_index.js.haml | |
| :plain | |
| $("##{escape_javascript models.first.class.name.tableize.dasherize}").html("#{escape_javascript render(models)}"); | |
| $('#pager').html("#{escape_javascript(paginate(models, remote: true).to_s)}#{escape_javascript(page_entries_info models)}"); |
| var body = document.body, | |
| timer; | |
| window.addEventListener('scroll', function() { | |
| clearTimeout(timer); | |
| if(!body.classList.contains('disable-hover')) { | |
| body.classList.add('disable-hover') | |
| } | |
| timer = setTimeout(function(){ |
| # GitHub configuration to push same repository into different services | |
| [core] | |
| repositoryformatversion = 0 | |
| filemode = true | |
| bare = false | |
| logallrefupdates = true | |
| # git push all | |
| [remote "all"] | |
| url = [email protected]:<login>/<repository>.git | |
| url = [email protected]:<login>/<repository>.git |