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
@nullivex
nullivex / gitcopy.sh
Last active December 15, 2015 06:29
Dirty script to copy a file with history from one git repo to another and allows stream changes to all the patches using regex. Could definitely be improved.
#!/bin/bash
odir=`pwd`
[ $# -lt 3 ] && echo "Usage: $0 <new repo> {<path>} {<proc>}"
new_repo=
ptr=0
proc_ptr=0
path_ptr=0
@nullivex
nullivex / COPYING
Last active December 15, 2015 07:58
LGPL for OpenLSS
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
@nullivex
nullivex / autocommit.sh
Last active December 15, 2015 11:18
LSS Package Release Scripts
#!/bin/bash
msg=$1
commit() {
for line in $1; do
echo "Committing $line"
cd $line;
git commit -a -m "$2"
cd ..
@nullivex
nullivex / push_pkg.sh
Created March 27, 2013 03:58
Push LSS packages from composer tree
#!/bin/bash
pkg="$1"
cd $1
#check for untracted files
if [ $(git status | grep -i "Untracked files" | wc -l) -gt 0 ]; then
echo "Untracked files cant push"
exit
@nullivex
nullivex / README.md
Last active February 8, 2022 19:57
Windows 7 64bit, NodeJS 32bit, MongoDB, Mongoose, Bcrypt, SocketIO, Canvas, Git

Windows NodeJS Stack

This took me several hours to figure out so I figured it was worth writing down.

Hopefully this step by step can be used to get node running locally without a lot of problems that are commonly ran into.

Downloads

Update July 7th 2014 - Updated most of the versions including not pointing to the heartbleed version of OpenSSL

@nullivex
nullivex / 0-NPM-Style-WebStorm.md
Last active December 26, 2015 15:49
Webstorm NPM Style, MyBlackBoard

NPM Style WebStorm 7

If you are attempting the follow the NPM style coding guidelines these configurations may help you get up and running.

There are a couple standalone files

  • MyBlackBoard.icls - this is a modified blackboard color scheme modded to work with Terminus font
  • npm-style.xml - this is a code styling guide that matches as much of NPM coding guidelines as possible
  • settings.jar - My entire settings export useful for first time setup.
@nullivex
nullivex / Testing ActionHero.md
Last active December 30, 2015 10:39
Testing ActionHero; I used Mocha for the testing framework and Chai for the assertion library -- http://actionherojs.com

Testing ActionHero

I used Mocha for the testing framework and Chai for the assertion library.

See http://actionherojs.com for ActionHero information.

Folder Structure

  • test
  • actions
@nullivex
nullivex / stats.js
Last active August 29, 2015 13:58
Example JS stat bucket roller
'use strict';
var statTracker = function(interval){
if(!interval) interval = 60000
//hits (would be stored in mongo
var hits = {total: 0, hour: 0, day: 0, month: 0}
//last counters
var last = {hour: 0, day: 0, month: 0}
//previous time increments
@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
@nullivex
nullivex / stream.js
Created August 25, 2014 21:36
Proper streaming from SSH2 on Node
'use strict';
var fs = require('fs')
var SSH = require('ssh2')
var conn = new SSH()
conn.on('ready',function(){
conn.exec('cat .ssh/known_hosts',function(err,stream){
stream.setEncoding('utf-8')
stream.on('readable',function(){
console.log('stream readable')