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
body { | |
background: #30587c; | |
} | |
.white_border { | |
border: #fff solid 10px; | |
} | |
.left_horn_bg { | |
width: 26px; |
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
require 'mogli' | |
module FacebookIntegrationHelpers | |
shared_context "with unconnected facebook user" do | |
let(:fb_user) { create_test_user(installed: false) } | |
after { fb_user.destroy } | |
end | |
def app_client | |
Mogli::AppClient.new(AppConfig.facebook.access_token, AppConfig.facebook.app_id) |
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
# restore the gems that raised "Illformed requirement" | |
$ gem pristine selenium-webdriver | |
$ gem pristine cucumber | |
$ gem pristine multi_xml | |
$ gem pristine mogli | |
$ gem pristine httparty | |
$ gem pristine simplecov-html | |
$ gem pristine simplecov |
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
Configuration file `/etc/mongodb.conf' | |
==> Modified (by you or by a script) since installation. | |
==> Package distributor has shipped an updated version. | |
What would you like to do about it ? Your options are: | |
Y or I : install the package maintainer's version | |
N or O : keep your currently-installed version | |
D : show the differences between the versions | |
Z : start a shell to examine the situation | |
The default action is to keep your current version. | |
*** mongodb.conf (Y/I/N/O/D/Z) [default=N] ? D |
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
create database db_name; | |
GRANT ALL ON db_name.* TO db_name@localhost IDENTIFIED BY 'pass'; | |
FLUSH PRIVILEGES; |
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
# dump | |
mongodump --host localhost:27017 --db db_name --out /path/to/dump | |
# restore | |
mongod --port 27017 --drop --dbpath /path/to/dump |
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 apt-get install build-essential curl libreadline-dev libxslt-dev libxml2-dev libssl-dev git-core | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
rvm pkg install readline | |
rvm pkg install zlib | |
rvm pkg install openssl | |
rvm install 1.9.2 --with-openssl-dir=$HOME:/usr --with-zlib-dir=$HOME:/usr | |
rvm use 1.9.2 --default |
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
module Fluent | |
class RedisOutput < BufferedOutput | |
Fluent::Plugin.register_output('redis', self) | |
attr_reader :host, :port, :db_number, :redis | |
def initialize | |
super | |
require 'redis' | |
require 'msgpack' | |
end |
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
ruby-1.9.2-p290 :001 > %w{b k o n s u m t m t y m a i a i o y m n i}.length | |
=> 21 | |
ruby-1.9.2-p290 :002 > "b k o n s u m t m t y m a i a i o y m n i".length | |
=> 41 | |
ruby-1.9.2-p290 :003 > %w{b k o n s u m t m t y m a i a i o y m n i} | |
=> ["b", "k", "o", "n", "s", "u", "m", "t", "m", "t", "y", "m", "a", "i", "a", "i", "o", "y", "m", "n", "i"] | |
ruby-1.9.2-p290 :004 > %w{b k o n s u m t m t y m a i a i o y m n i}.class | |
=> Array |
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
# find large files | |
sudo find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }' |
OlderNewer