Skip to content

Instantly share code, notes, and snippets.

View asbjornenge's full-sized avatar
Swinging madly across the sun.

Asbjorn Enge asbjornenge

Swinging madly across the sun.
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@bradwright
bradwright / websockets-server.js
Created June 11, 2011 23:29
Pure Node.js WebSockets server
/*
* node-ws - pure Javascript WebSockets server
* Copyright Bradley Wright <brad@intranation.com>
*/
// Use strict compilation rules - we're not animals
'use strict';
var net = require('net'),
crypto = require('crypto');
@nrabinowitz
nrabinowitz / quantize.js
Created July 25, 2011 17:19
Javascript module for color quantization, based on Leptonica
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@asbjornenge
asbjornenge / nanodom.js
Last active December 31, 2015 22:29
Nanodom.js - a very small dom manipulation library.
define([], function() {
function dom() {}
dom.prototype = new Array;
dom.prototype.append = function(element) { element.map(function(e) { this[0].appendChild(e) }.bind(this)); return this}
dom.prototype.remove = function() { this.map(function(e) {e.parentNode.removeChild(e)}); return this}
dom.prototype.prepend = function(element) { element.map(function(e) { this[0].insertBefore(e, this[0].childNodes[0]) }.bind(this)); return this}
dom.prototype.empty = function(elements) { this.map(function(e) { e.innerHTML = ""}); return this}
dom.prototype.addClass = function(classes) { this.map(function(e) { e.className += ' '+classes}); return this}
dom.prototype.removeClass = function(classes) {
@aslansky
aslansky / gist:8741515
Created January 31, 2014 19:44
gulp livereload (gulp 3.5.0)
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var lr = require('tiny-lr');
var http = require('http');
var path = require('path');
var ecstatic = require('ecstatic');
var tlr = lr();
var livereload = function (evt, filepath) {
tlr.changed({
@theanalyst
theanalyst / fibs.c
Last active November 23, 2018 14:02
Hy, Python & C play nicely with each other
#include "fibs.h"
long fib(int n)
{
if (n == 0)
return 1;
else if (n == 1)
return 1;
else
return fib(n-1) + fib(n-2);
@asbjornenge
asbjornenge / reactTestQueryUtil.js
Last active August 29, 2015 14:05
React test utils wrapper
var React = require('react')
var ReactAddons = require('react/addons')
var ReactTestUtils = React.addons.TestUtils
var reactTestQueryUtil = function (tree) {
this.tree = tree
}
reactTestQueryUtil.prototype.class = function (cls) {
this.class = cls
return this

Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward discussions repo

io.js - what you need to know

io-logo-substack

  • io is a fork of node v0.12 (the next stable version of node.js, currently unreleased)
  • io.js will be totally compatible with node.js
  • the people who created io.js are node core contributors who have different ideas on how to run the project
  • it is not a zero-sum game. many core contributors will help maintain both node.js and io.js
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.