Skip to content

Instantly share code, notes, and snippets.

@rauchg
rauchg / Readme.md
Last active September 30, 2024 17:11

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@iwootten
iwootten / start_docker_compose.sh
Created January 29, 2016 11:45
Use your docker-machine host ip as docker-compose environment variable
sed -e "s/DOCKER_HOST_IP/$(docker-machine ip your-machine-name)/g" docker-compose.yml | docker-compose --file - up
@ryoppy
ryoppy / hbase-standalone
Created August 14, 2013 04:22
/etc/init.d/hbase-standalone
#!/bin/sh
#
# hbase - this script starts and stops the hbase-standalone daemon
#
# chkconfig: - 85 15
# description: hbase-standalone daemon
# processname: hbase-standalone
# Source function library.
. /etc/rc.d/init.d/functions
@misterdai
misterdai / redstrap.js
Created April 18, 2012 15:04
Bookmarklet that will redesigns Redmine for Twitter Bootstrap. NOT for permanent usage OR as a theme JS file. Only to promote better theme support (http://www.redmine.org/issues/9754) for consideration.
// Bookmarklet to alter Redmine theme to look like twitter bootstrap
// Only a concept to test the design
// Suggest you minify first (removing comments), before bookmarking
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.7.2",function($,L){
// BEGIN
$(function() {
$('link[rel=stylesheet]').remove();
$('head')
@misterdai
misterdai / getUploadData.cfm
Created July 1, 2010 12:20
Retrieves upload information without using CFFile
<cfscript>
function getUploadData() {
var local = {};
local.result = {};
if (cgi.request_method Eq 'post') {
local.uploads = form.getPartsArray();
if (StructKeyExists(local, 'uploads')) {
local.count = ArrayLen(local.uploads);
for (local.u = 1; local.u Lte local.count; local.u++) {
local.info = GetFileInfo(form[local.uploads[local.u].getName()]);