Skip to content

Instantly share code, notes, and snippets.

@joseluisq
joseluisq / jquery-bootstrap-datepicker.css
Created February 15, 2016 16:49 — forked from miwahall/jquery-bootstrap-datepicker.css
jQuery UI Datepicker Bootstrap 3 Style
.ui-datepicker {
background-color: #fff;
border: 1px solid #66AFE9;
border-radius: 4px;
box-shadow: 0 0 8px rgba(102,175,233,.6);
display: none;
margin-top: 4px;
padding: 10px;
width: 240px;
}
@joseluisq
joseluisq / style_guide.md
Created February 19, 2016 22:50 — forked from dominictarr/style_guide.md
style guide

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

@joseluisq
joseluisq / propel.yaml
Created March 18, 2016 19:24 — forked from cristianoc72/propel.yaml
Propel sample configuration file
## Sample Propel configuration file ##
propel:
## General settings ##
general:
# The name of your project.
# This affects names of generated files, etc.
project:
version: 2.0.0-dev
@joseluisq
joseluisq / class.stream.php
Created March 20, 2016 23:12 — forked from jas-/class.stream.php
PHP stream handler w/ support for multiple files over PUT
<?php
/**
* stream - Handle raw input stream
*
* LICENSE: This source file is subject to version 3.01 of the GPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of
* the GPL License and are unable to obtain it through the web, please
*
@joseluisq
joseluisq / fullCalendarDisablePrevNext.js
Created March 28, 2016 21:18 — forked from juanbrujo/fullCalendarDisablePrevNext.js
jQuery FullCalendar.js: disable prev/next button for past/future dates
$('#calendar').fullCalendar({
viewRender: function(currentView){
var minDate = moment(),
maxDate = moment().add(2,'weeks');
// Past
if (minDate >= currentView.start && minDate <= currentView.end) {
$(".fc-prev-button").prop('disabled', true);
$(".fc-prev-button").addClass('fc-state-disabled');
}
else {
@joseluisq
joseluisq / 0_reuse_code.js
Created May 3, 2016 21:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@joseluisq
joseluisq / gist:6823534399e574e2d92560261ba40a52
Created May 14, 2016 22:21
Walmart Mobile node.js Setup

Overview

We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.

Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.

We also serve original node.js services off another server zone which runs closed source plugins using hapi.

Analytics

@joseluisq
joseluisq / node-tar.js
Created May 26, 2016 16:19 — forked from mafintosh/node-tar.js
tar-fs vs node-tar benchmarks
var tar = require('tar');
var fstream = require('fstream');
var input = '/Users/maf/Downloads';
var reader = fstream.Reader({type: "Directory", path: input});
var pack = tar.Pack();
reader.pipe(pack).pipe(tar.Extract({path: '/tmp/destination-node-tar'}));
@joseluisq
joseluisq / install-comodo-ssl-cert-for-nginx.rst
Created June 14, 2016 02:23 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert