Skip to content

Instantly share code, notes, and snippets.


Christopher Blanchard cblanc

View GitHub Profile
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
lukas-vlcek / gist:5143799
Last active Oct 25, 2021
Adding a new analyzer into existing index in Elasticsearch (requires close/open the index). Tested with Elasticsearch 0.19.12.
View gist:5143799
// create an index with an analyzer "myindex"
curl -X PUT localhost:9200/myindex -d '
"settings" : {`
duncansmart / progressive-ace.htm
Created Mar 28, 2013
Integrating ACE Editor in a progressive way
View progressive-ace.htm
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea>
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea>
<script src="//"></script>
// Hook up ACE editor to all textareas with data-editor attribute
$(function () {

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

xphyr / index.js
Created Jul 14, 2013
Simple Plugin for "Uptime" that send alerts via Pushover. I am not a Node hacker ... I barely understand why this code works .... but it does. I have not tried it with multiple users yet, so dont know if it will work to do multiple notifications. Let me know if you try it.
View index.js
* Pushover plugin for the uptime project -
* Thanks to DMathieu for the Campfire plugin which I basically hacked up to make this
* work:
* This index.js files goes to a directory `plugins/pushover` in your installation of uptime.
* Notifies all events (up, down, paused, restarted) to pushover
* This plugin has a dependency on `pushover-notifications`.
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Jan 27, 2022
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use 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

ducin / console-load-js-script.js
Last active Feb 18, 2021
load js script from blank page browser (execute following code in the browser console)
View console-load-js-script.js
root.getScript = function(url) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
rtgibbons / logger.js
Created Nov 7, 2013
Logger Library with winston
View logger.js
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
ryanray / deploy.rb
Created Nov 21, 2013
I couldn't find a quick example of how to deploy a node.js app using Capistrano 3. This gist assumes you are using Capistrano 3, Upstart, Forever, ssh/forward agent, and an unprivileged user named 'deploy'. Hopefully this simple setup will help to get you started.
View deploy.rb
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, ''
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git
mobilemind /
Last active Jan 21, 2022
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName