Skip to content

Instantly share code, notes, and snippets.

View gaboesquivel's full-sized avatar
👾
buidl

Gabo Esquivel gaboesquivel

👾
buidl
View GitHub Profile
### Definitions:
1. A .csr file is a certificate signing request which initiates your certificate request with a certificate provider and contains administrative information about your organization.
2. A .key file is the private key used to encrypt your site’s SSL-enabled requests.
3. .pem and .crt extensions are often used interchangeably and are both base64 ASCII encoded files. The technical difference is that .pem files contain both the certificate and key whereas a .crt file only contains the certificate. In reality this distinction is often ignored.
## Generate SSL Keys for Heroku:
$ openssl genrsa -des3 -out server.orig.key 2048
$ openssl rsa -in server.orig.key -out server.key
$ openssl req -new -key server.key -out server.csr // Used for request of cert generation

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

[
{
"class": "sidebar_container",
// $base02: #073642
"layer0.tint": [7,54,66],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@gaboesquivel
gaboesquivel / gist:93efe63fc2a52e1f42e9
Created February 20, 2015 19:00
the only product on earth I can't use with my google account is youtube!!
Os 12:07 PM
Unfortunately, YouTube is not part of the services supported directly by Google Apps for Business support team.
However, channel merging is not an option at the moment. In regards to your declared country, let me find out if something else can be done.
Would you mind waiting for a few minutes?
me 12:09 PM
sure, I'm ok with canceling this org and creating a new one. oh but would be a mess with OAuth everywhere
I'm afraid that wouldn't work, or maybe you can tell me if by using same email on a different org that is registered as US based will allow me to login to all the service where I currently use OAuth
Os 12:11 PM
As long as the account was registered under US yes, also, it would be necessary to add your domain 'gaboesquivel.com' as secondary domain, create new users under that account with your domain, and services will be enabled or able to be turned ON.
me 12:13 PM

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

##Chai Expect

##Language Chains

  • to
  • be
  • been
  • is
  • that
  • and
  • have

Clustering: The basics

The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)

It does not balance, it leaves it to the kernel.

In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)

/**
* This gulpfile will copy static libraries and a index.html file as well as
* merge, babelify and uglify the rest of the javascript project.
*
* TODO:
* - Separate media, libs and src with different watchers.
* - Media and libs should only be copied to dist if they are different sizes.
*
* The expected project is to be laid out as such:
*
@gaboesquivel
gaboesquivel / package.json
Last active August 29, 2015 14:25 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",