This file contains 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
run 'rm public/index.html' | |
gem 'paperclip' | |
generate :scaffold, 'user first_name:string last_name:string email:string login:string password:string' | |
generate :paperclip, 'user avatar' | |
route %[map.root :controller => 'users'] | |
rake 'db:migrate' | |
run %[echo "class User < ActiveRecord::Base | |
has_attached_file :avatar, :styles => {:thumb => '100x100'}, :url => '/avatars/:id/:style' | |
validates_presence_of :first_name, :last_name, :email, :login, :password |
This file contains 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
# rake db:create:all | |
/home/kuca/.rvm/gems/ruby-1.9.2-p180@rorganizer/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:991: [BUG] Segmentation fault | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] | |
-- control frame ---------- | |
c:0052 p:---- s:0192 b:0192 l:000191 d:000191 CFUNC :initialize | |
c:0051 p:---- s:0190 b:0190 l:000189 d:000189 CFUNC :new | |
c:0050 p:0020 s:0180 b:0180 l:000179 d:000179 METHOD /home/kuca/.rvm/gems/ruby-1.9.2-p180@rorganizer/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapte | |
c:0049 p:0055 s:0177 b:0177 l:000176 d:000176 METHOD /home/kuca/.rvm/gems/ruby-1.9.2-p180@rorganizer/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapte | |
c:0048 p:---- s:0170 b:0170 l:000169 d:000169 FINISH |
This file contains 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
upstream rails { | |
server 127.0.0.1:3000; | |
#server unix:/tmp/thin.0.sock; | |
} | |
server { | |
# we haven't checked to see if Rack::Deflate on the app server is | |
# faster or not than doing compression via nginx. It's easier | |
# to configure it all in one place here for static files and also | |
# to disable gzip for clients who don't get gzip/deflate right. |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
struct S { | |
int a; | |
}; | |
int main() | |
{ | |
struct S *arr=(struct S *) malloc(2*sizeof(struct S)); |
This file contains 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
sed -i.bak -r 's/Gopa/Sraka/' $(grep -l -r Gopa config) | |
# for with git | |
sed -i.bak -r 's/Gopa/Sraka/' $(git grep -l admin) |
This file contains 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
#!/bin/sh | |
uname -m | grep 86 && ARCH=32 | |
uname -m | grep 64 && ARCH=64 | |
VERSION='21.0.1180.4' | |
URL="http://chromedriver.googlecode.com/files/chromedriver_linux${ARCH}_${VERSION}.zip" | |
mkdir -p $HOME/bin | |
ZIP_ARCH=$HOME/bin/chromedriver-$ARCH-$VERSION.zip |
This file contains 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 aptitude install tuxguitar tuxguitar-jsa timidity | |
http://followthegeeks.com/no-sound-in-tuxguitar-here-is-the-solution/ | |
# run tuxguitar | |
# tools->settings->sound check "real time sequencer" and "gervill" there |
This file contains 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
#!/bin/sh | |
CURRENT_DIR=$PWD | |
RUBY_VERSION=1.9.3-p194-perf | |
# same path used for heroku, do not change | |
RUBY_BUILD_PATH=vendor/ruby-1.9.3 | |
curl -L https://github.com/sstephenson/ruby-build/tarball/master | tar zx |
This file contains 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
tail -f log/development.log | sed -r '/^Started\ GET\ \"\/assets\//,+5d' |
This file contains 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
add dotdeb repository: http://www.dotdeb.org/instructions/ | |
sudo aptitude install redis-server # for stable | |
sudo aptitude -t stable install redis-server # for testing |
OlderNewer