Skip to content

Instantly share code, notes, and snippets.


Vinicius Horewicz wicz

View GitHub Profile
View haproxy.conf
maxconn 32
tune.ssl.default-dh-param 2048
mode http
option forwardfor
option http-server-close
timeout connect 2s
wicz /
Created Jul 5, 2016 — forked from chrisbolin/
Python SimpleHTTPServer for Static Serving (React / Angular / Ember) in HTML5 mode (a la mod_rewrite)
Taken from:
import SimpleHTTPServer, SocketServer
import urlparse, os
PORT = 3000
wicz /
Created Jun 1, 2016 — forked from demisx/
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes


wicz /
Created May 23, 2016 — forked from mislav/
Jim Weirich on the differences between procs and lambdas in Ruby

Jim Weirich:

This is how I explain it… Ruby has Procs and Lambdas. Procs are created with { }, lambdas are created with lambda {} and ->() {}.

In Ruby 1.8, proc {} creates lambda, and Ruby 1.9 it creates procs (don't ask).

Lambdas use method semantics when handling parameters, procs use assignment semantics when handling parameters.

This means lambdas, like methods, will raise an ArgumentError when called with fewer arguments than they were defined with. Procs will simply assign nil to variables for arguments that were not passed in.

wicz /
Created Apr 9, 2013
Configuration files and scripts for the blog post: Faster Rails 3 deployments to AWS Elastic Beanstalk
#!/usr/bin/env bash
mkdir /var/app/ondeck/vendor /var/app/ondeck/public /var/app/support/bundle /var/app/support/assets /var/app/support/cache
ln -s /var/app/support/bundle /var/app/ondeck/vendor
ln -s /var/app/support/assets /var/app/ondeck/public
ln -s /var/app/support/cache /var/app/ondeck/vendor
sed -i 's/"rake/"bundle exec rake/' /opt/elasticbeanstalk/hooks/appdeploy/pre/
You can’t perform that action at this time.