Skip to content

Instantly share code, notes, and snippets.

🌺

Phil Pirozhkov pirj

🌺
Block or report user

Report or block pirj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nginx.conf
user app;
worker_processes 2;
error_log /home/app/logs/nginx.error.log info;
events {
worker_connections 1024;
}
@pirj
pirj / fibquence.rb
Created Sep 5, 2012 — forked from egoholic/fibquence.rb
Oneline fibonacci sequence generator
View fibquence.rb
def fib n;n==0?[0]:n==1?[0,1]:(2..n-1).inject([0,1]){|a|a<<(a[-1]+a[-2])};end
@pirj
pirj / fibonacci.rb
Created Sep 5, 2012 — forked from NILID/fibonacci.rb
fibonacci
View fibonacci.rb
def fib(n)a,b,s=0,1,[];n.times{s<<a;c=b;b=a+b;a=c};s end
p fib(33)
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, ...]
@pirj
pirj / pr.md
Created Feb 1, 2017 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

You can’t perform that action at this time.