Skip to content

Instantly share code, notes, and snippets.

View dcalixto's full-sized avatar
🎯
Focusing

Daniel dcalixto

🎯
Focusing
View GitHub Profile
@dcalixto
dcalixto / osx_lion_rail_setup.md
Created May 6, 2012 01:58 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MongoDB

Setup new Mac with OSX Lion from scratch

These commands are good as of 2012-05-05.

Install Command Line Tools for Xcode 4

https://developer.apple.com/downloads The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.

#amazon ec2 image
#ubuntu 10.10, 64bit : ami-cef405a7
#to add additional ebs storage to your instance
#goto volumes and create a volume in the same zone as the instance
#after it is created, attach the volume to the instance
Attachment Information:i-dbb12eb7:/dev/sdp (attached)
#ssh to ec2
ssh -i <key-file>.pem ubuntu@<ip-address-to-ec2>
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
@dcalixto
dcalixto / _README.md
Created June 28, 2012 16:13 — forked from kneath/_README.md
Intelligent asset bundling for Rails (GitHub's asset bundling)

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js
@dcalixto
dcalixto / gist:ce3124c7d5571badd9dd
Last active August 28, 2015 17:34 — forked from manafire/gist:c385b40031309af1c9d6
Ubuntu + rbenv + github + Rails + Ruby + nginx + passenger + ec2
# IN AMAZON EC2 SERVER #
########################
sudo su
apt-get -y update && apt-get -y upgrade
apt-get install vim git-core curl openssh-server openssh-client python-software-properties build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libcurl4-openssl-dev aptitude
/usr/sbin/groupadd wheel
/usr/sbin/visudo
(paste bottom)
%wheel ALL=(ALL) ALL
@dcalixto
dcalixto / adams-heroku-values.md
Last active August 28, 2015 17:44 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@dcalixto
dcalixto / a_rvm_mina_unicorn_nginx_configure
Last active September 20, 2015 15:49
RVM+Mina+Unicorn+Nginx deployment configure.
Files list below.
@dcalixto
dcalixto / installation.sh
Created September 24, 2015 22:06 — forked from mikhailov/installation.sh
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@dcalixto
dcalixto / nginx-config-spdy-example
Created September 30, 2015 17:30 — forked from loopj/nginx-config-spdy-example
Nginx SPDY configuration example
server {
listen 443 ssl spdy default_server;
server_name example.com;
ssl_certificate /etc/ssl/certs/my.ssl.crt;
ssl_certificate_key /etc/ssl/private/my.ssl.key;
root /mysite/current/public;
passenger_enabled on;
@dcalixto
dcalixto / gist:368e2ce716a05981cbe2
Created October 5, 2015 09:32 — forked from pullmonkey/gist:3318540
Dynamic Select Box Rails code
# create new rails app
# rails new dynamic_select_boxes -m https://raw.github.com/RailsApps/rails3-application-templates/master/rails3-haml-html5-template.rb
# create models:
# rails g model genre name:string
# rails g model artist name:string genre_id:integer
# rails g model song title:string artist_id:integer
# rake db:migrate