Skip to content

Instantly share code, notes, and snippets.

View christianrojas's full-sized avatar

Christian Rojas christianrojas

View GitHub Profile
@christianrojas
christianrojas / rails-4-ubuntu-13-vps-capistrano-3.md
Last active August 29, 2015 13:59
Rails 4.1 + Ubuntu 13.10 64bits VPS + Capistrano 3

VPS Setup

Groups and Privileges

Great info here

Change root password:

passwd
@christianrojas
christianrojas / feedback-angularjs-error.js
Created May 22, 2014 19:48
feedback-angularjs-error.js
cbulz.controller("FeedbackController", ["$scope", 'Feedback', function($scope, Feedback){
$scope.create = function(){
var session = new Feedback({
feedback: $scope.feedback
});
session.$save($scope.success, $scope.error)
};
$scope.success = function(response, responseHeader){
console.log('Success')
@christianrojas
christianrojas / gist:3f9a7e7503168a14dbf9
Last active August 29, 2015 14:03
Fix PostgreSQL Mavericks
brew install postgresql
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/Homebrew/homebrew/issues/issue/2510
To migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see:
http://www.postgresql.org/docs/9.3/static/upgrading.html
When installing the postgres gem, including ARCHFLAGS is recommended:
@christianrojas
christianrojas / .aliases
Last active August 29, 2015 14:05
vimrc
# grc overides for ls
# Made possible through contributions from generous benefactors like
# `brew install coreutils`
if $(gls &>/dev/null)
then
alias ls="gls -F --color"
alias l="gls -lAh --color"
alias ll="gls -l --color"
alias la="gls -A --color"
fi
@christianrojas
christianrojas / .vimrc
Created September 7, 2014 14:00
.vimrc Sept 2014
" Example Vim configuration.
" Copy or symlink to ~/.vimrc or ~/_vimrc.
"Pathogen configuration
execute pathogen#infect()
:let mapleader = " "
set autoindent

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@christianrojas
christianrojas / zpl-zt410-command.txt
Last active August 29, 2015 14:14
ZPL ZT410 Command
^XA
^FO60,30^GFA,1116,1116,36,J03IFE,I07LF,003NF,01OFE,03JFC7JF,0JFI01FFE,1IF8J03F8K0FEgO01FC,3FFCL06J03JF1FE03FCFE0FF3IFE03IFCJ07JF3FC07F8FDFFJ01FF8,7FF8P01MFE03IFE0MF8KFI03MFC07IFCFF8I03FF,7FFQ07MFE03IFE0SF800NFC07IF87FCI07FE,FFEQ0IFE7IFE03IFC0OFEIFC01IFCJFC07IF03FEI0FFC,FFCP03FFC007FFE03FF800FFE007FFC00FFE03FF8007FFC07FF001FF001FF8,FFCP03FFJ0FFE03FFI0FFC003FF8003FE07FEI01FFC07FEI0FF803FF,FFCP07FCJ07FE03FEI0FF8001FFI03FE0FFCJ0FFC07FCI07F807FE,FFEP07FCJ03FE03FEI0FFI01FFI03FE0FF8J07FC07FCI03FC0FFC,7FEP07F8J03FE03FCI0FFI01FFI01FE0FF8J07FC07FCI03FE0FF8,7FF8O07FCJ03FE03FCI0FFI01FFI01FE0FF8J07FC07FCI01FF1FF,3FFCL06007FCJ07FE03FCI0FFI01FFI01FE0FFCJ0FFC07FCJ0FFBFE,1IFK01F803FFJ0FFE03FCI0FFI01FFI01FE07FEI01FFC07FCJ07IFC,0JFJ0FFE03FFC003FFE03FCI0FFI01FFI01FE03FF8007FFC07FCJ03IF8,03JFC7JF01IFC3IFE03FCI0FFI01FFI01FE01IF87IFC07FCJ01IF,01OFC007MFE03FCI0FFI01FFI01FE00NFC07FCK0FFE,003NFI01MFE03FCI0FFI01FFI01FE003MFC07FCK0FFC,I07LF8J07JF9FE03FCI0FFI01FFI01FEI07JF3FC07FCK0FF8062,J03JFM03FF8gN07FF8Q01FF0041,iI03FE009C8,iI07F
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@christianrojas
christianrojas / gist:cdb18ccb7ddf5f4a5dfc
Created November 6, 2015 10:11
Sublime text 3 preferences
{
"always_show_minimap_viewport": true,
"auto_complete_selector": "source, text",
"bold_folder_labels": true,
"color_scheme": "Packages/User/Color Highlighter/themes/GitHub (SL).tmTheme",
"disable_tab_abbreviations_on_auto_complete": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
@christianrojas
christianrojas / circle.yml
Created May 12, 2016 11:26 — forked from jonah-williams/circle.yml
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300