Skip to content

Instantly share code, notes, and snippets.

View marianposaceanu's full-sized avatar

Posăceanu Marian marianposaceanu

View GitHub Profile
@marianposaceanu
marianposaceanu / puma_vs_unicorn.md
Last active November 13, 2016 04:06
puma 2.9.0 vs unicorn 4.8.3

Environment info

  • Ruby 2.1.2
  • 2.8Ghz Core i7 / 2 cores - 4 hardware threads / 8G Ram

Unicorn 4.8.3

Using four workers

task :ask_production_confirmation do
set(:confirmed) do
puts <<-WARN
========================================================================
WARNING: You're about to perform actions on production server(s)
Please confirm that all your intentions are kind and friendly
========================================================================
  • The Catcher in the Rye, J.D. Salinger: It shows you what a teenager thinks. His fears, what does he loves and how can they react.

  • On the Road, Jack Kerouac: The author can make you feel that you are traveling on the routes of United States in late 40s. He can make you feel free.

  • High Fidelity, Nick Hornby: I love music and this is a perfect book for music lovers. In the end, is a book about love, but in the middle of it is full of songs.

  • Ham on Rye, Charles Bukowski: Hank is one of my favorites writers (his poetry is amazing) and this is an autobiography. Every anecdote makes us understand why Bukowski thinks as he does.

  • A Moveable Feast, Ernest Hemingway: This book narrates Hemingway’s life in París in the 20s as an expatriate writer. You can read it 30 times.

How to fix the Reference has invalid format in git repos due to Google Drive

find . -type f -name "* (1)*" -exec rm -f {} \;
awk '!/conflicted/' .git/packed-refs > temp && mv temp .git/packed-refs

Note: those two lines are destructive commands if you first want to see what they do try:

find . -type f -name "* (1)*"

awk '!/conflicted/' .git/packed-refs

# ___ ___ ___ ___ ___ ___ ___ ___
# /\ \ /\ \ /\__\ /\ \ /\ \ /\ \ /\__\ |\__\
# /::\ \ /::\ \ /::| | /::\ \ /::\ \ /::\ \ /:/ / |:| |
# /:/\:\ \ /:/\:\ \ /:|:| | /:/\:\ \ /:/\:\ \ /:/\:\ \ /:/ / |:| |
# /:/ \:\ \ /::\~\:\ \ /:/|:|__|__ /::\~\:\ \ /::\~\:\ \ /:/ \:\__\ /:/ / ___ |:|__|__
# /:/__/_\:\__/:/\:\ \:\__/:/ |::::\__\ /:/\:\ \:\__/:/\:\ \:\__/:/__/ \:|__/:/__/ /\______/::::\__\
# \:\ /\ \/__\:\~\:\ \/__\/__/~~/:/ / \/_|::\/:/ \:\~\:\ \/__\:\ \ /:/ \:\ \ /:/ \::::/~~/~
# \:\ \:\__\ \:\ \:\__\ /:/ / |:|::/ / \:\ \:\__\ \:\ /:/ / \:\ /:/ / ~~|:|~~|
# \:\/:/ / \:\ \/__/ /:/ / |:|\/__/ \:\ \/__/ \:\/:/ / \:\/:/ / |:| |
# \::/ /
$(function() {
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
$("meta[name='viewport']").attr('user-scalable', 'yes');
}
});

Simple steps to install dynamo and its deps on OSX

We need to have a fresh copy Elixi that works with Erland R17

brew install erlang --devel

brew install elixir --HEAD

Some small heroku tips

heroku pgbackups:capture --expire
curl -o latest.dump `heroku pgbackups:url`

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump