Skip to content

Instantly share code, notes, and snippets.

echo "* Updating system"
apt-get update
apt-get -y upgrade
echo "* Installing packages"
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop
id -u deploy &> /dev/null
if [ $? -ne 0 ]
then
# Bob answers 'Sure.' if you ask him a question.
# He answers 'Woah, chill out!' if you yell at him (ALL CAPS).
# He says 'Fine. Be that way!' if you address him without actually saying anything.
# He answers 'Whatever.' to anything else.
class Bob
def hey(phrase)
responses.fetch(Phrase.new(phrase).type, 'Whatever.')
end
ororo@S10611:~$ ps aux | grep ffmpeg
ororo 18266 0.0 0.0 4300 608 ? S 17:04 0:00 sh -c ffmpeg -y -i "/home/ororo/repo/releases/20140325121613/public/uploads/video/file/17385/Man.vs.Wild.S02E06.Scotland.mkv" -b:v 1500k -vcodec libvpx -acodec libvorbis -ab 160k -ac 2 -g 30 "/home/ororo/repo/releases/20140325121613/public/uploads/video/file/17385/Man.vs.Wild.S02E06.Scotland.webm"
ororo 18269 102 0.1 1330456 61208 ? Rl 17:04 7:10 ffmpeg -y -i /home/ororo/repo/releases/20140325121613/public/uploads/video/file/17385/Man.vs.Wild.S02E06.Scotland.mkv -b:v 1500k -vcodec libvpx -acodec libvorbis -ab 160k -ac 2 -g 30 /home/ororo/repo/releases/20140325121613/public/uploads/video/file/17385/Man.vs.Wild.S02E06.Scotland.webm
ororo 18381 0.0 0.0 4300 612 ? S 17:05 0:00 sh -c ffmpeg -y -i "/home/ororo/repo/releases/20140325121613/public/uploads/video/file/17386/Man.vs.Wild.S03E01_-_Sahara.avi" -b:v 1500k -vcodec libvpx -acodec libvorbis -ab 160k -ac 2 -g 30 "/home/ororo/
s="IyBUaGFua3MgZm9yIGxvb2tpbmcgYXQgbXkgY29kZ
S4KIwojIENvcHlyaWdodCAoQykgMjAwMiAgQ2hyaXN0a
WFuI E 5 l d Wtpc
mNoZ W 4 gP G N obmV
1a2l y Y 2hlb k B nbWF
pbC5 j b 20+CiM K I yBUa
GlzI H Byb2dyYW 0 gaXM
gZnJ l Z SBzb2Z0d2F y Z Tsge
W91I G NhbiByZWRpc3 R yaWJ
1dGU g aXQgYW5kL29yCi M g bW9k
<?xml version="1.0" encoding="utf-8"?>
<opml version="2.0">
<head>
<title>My feedly feeds</title>
</head>
<body>
<outline text="Codegram">
<outline text="JavaScript is Sexy | JavaScript is Sexy" htmlUrl="http://javascriptissexy.com" type="rss" xmlUrl="http://javascriptissexy.com/feed/"/>
<outline text="Katz Got Your Tongue?" htmlUrl="http://yehudakatz.com" type="rss" xmlUrl="http://yehudakatz.com/feed/"/>
FOO = 'GLOBAL NAMESPACE'
module A
FOO = "IN A"
module B
FOO = 'IN B'
def self.foo
p ::FOO
end
def forfeited_amount
sum = 0
all_grants.each do |grant|
sum += grant.forfeitures.between(from_date, to_date).sum(:amount)
end
sum
end
def second_forfeited_amount
all_grants.joins(:forfeitures)
[46] pry(main)> date = _
=> Thu, 02 Jun 2011
[47] pry(main)> date + 1.year
=> Sat, 02 Jun 2012
[48] pry(main)> 1.year
=> 31557600.0
[49] pry(main)> days_in_year = 1.year / 60.0 / 60.0 / 24.0
=> 365.25
[50] pry(main)> date + days_in_year
=> Fri, 01 Jun 2012
context "when prefered has to pay it's cap" do
let!(:shareholder1){ company.share_holders.create!(name: 'Darth Vader') }
let!(:ownerships){ [series_a_stock.ownerships.create(amount: 1e5), common_stock.ownerships.create(amount: 2e5),option_grant ] }
let(:returns) do
[
[{ round: Logarithm::RoundProxy.new(series_a_stock), money: 1e5, money_per_share: 1 } ], #preference
[{ round: Logarithm::RoundProxy.new(common_stock), money: 1e5, money_per_share: 0.5 }], #excercise option
[ #cap
<script>
$(document).ready(function(){
$('#buy-automated').click(function(){
var token = function(res){
console.log('Got token ID:', res.id);
};
StripeCheckout.open({
key: 'pk_Y9MZnemHi4X5Anj423q4m79gfaDqP',
address: true,