Skip to content

Instantly share code, notes, and snippets.

View nullivex's full-sized avatar
😶
Come try my web friendly packages and check out Kado!

Bryan Tong nullivex

😶
Come try my web friendly packages and check out Kado!
View GitHub Profile
@guerrerocarlos
guerrerocarlos / main.js
Created September 6, 2012 05:07
loading socket.io using require.js
// Require.js allows us to configure shortcut alias
require.config({
// The shim config allows us to configure dependencies for
// scripts that do not call define() to register a module
shim: {
'socketio': {
exports: 'io'
},
'underscore': {
exports: '_'
@nullivex
nullivex / ifb_wondershaper.sh
Created July 13, 2014 18:32
Wondershaper implementation that uses IFB for ingress rate limiting
#!/bin/sh
# Wonder Shaper
# please read the README before filling out these values
#
# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits. Also set the device that is to be shaped.
# All config needs to be done in /etc/config/wshaper
#. /lib/functions.sh
Here's how to make jQuery DataTables work with npm and webpack. DT checks for AMD compatibility first
which breaks when you're using CommonJS with webpack.
Install DT core: npm install datatables.net
Install a DT style: npm install datatables.net-bs (bootstrap)
Install the imports-loader webpack plugin: https://github.com/webpack/imports-loader#disable-amd
Create a loader "exception" just for DT in webpack.config.js:
module: {
loaders: [