Skip to content

Instantly share code, notes, and snippets.

View skipzero's full-sized avatar
Seeking new opportunities

Skip McBride skipzero

Seeking new opportunities
View GitHub Profile
@skipzero
skipzero / jsTest.js
Last active June 5, 2019 19:56
code test
Promise = function() {
this.check = [];
this.resolved = false;
};
Promise.prototype = {
success: function(callback){
if (this.resolved) {
callback(this.results);
} else {
@skipzero
skipzero / learnyounode2.js
Created July 1, 2014 18:56
Learnyounode tut test #2
var sum = 0;
for (var i= 2; i < process.argv.length; i++){
sum += Number(process.argv[i]);
}
console.log(sum);
@skipzero
skipzero / firstio.js
Created July 1, 2014 20:19
my first i/o!
var fs = require('fs');
var arg = process.argv;
var buf = fs.readFileSync(arg[2]);
var txt = buf.toString().split('\n').length -1;
console.log(txt);
@skipzero
skipzero / learnYouNode.js
Last active August 29, 2015 14:03
Async i/o node
var fs = require('fs')
, path = require('path')
, dirPath = process.argv[2]
, filter = process.argv[3];
fs.readdir(dirPath, function(err, data){
if (err) { throw err; }
for (file in data){
@skipzero
skipzero / ChromeOverrides
Last active August 29, 2015 14:16
Override Chrome Autocomplete input styles.
input:-webkit-autofill {
-webkit-text-fill-color : #fff;
box-shadow : 0 0 0px 1000px #333 inset;
}
@skipzero
skipzero / sass-htaccess
Created March 17, 2015 19:52
ht access for setting sass mime types to text/css
AddType text/css scss sass
@skipzero
skipzero / bootstrap.lua
Last active September 12, 2015 20:41 — forked from ntalbott/bootstrap.lua
local url = "https://gist.github.com/zerosquadron/d36b66f4a99a54797402/raw/gfs.lua"
local body = http.get(url).readAll()
local handle = fs.open("/gfs", "w")
handle.write(body)
handle.close()
@skipzero
skipzero / newKeyword.js
Created May 9, 2016 15:45
recreate the 'new' keyword using ES6.
function newKeyWord(funct) {
// we're given an array-like object containing all arguments;
const args = arguments;
//create our object and link it to the prototype chain;
let obj = Object.create(funct.prototype);
// use from to turn our array-like into an array;
args = Array.from(args)
@skipzero
skipzero / .zshrc-bu
Last active February 8, 2017 08:00
backing up my .zshrc cause it's pain in the ass when something happens and I have to put my aliases back in
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh/
export JAVA_8_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/bin/java"
export JAVA_7_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home"
export JAVA_6_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jre/bin/java"
#default java8
export JAVA_HOME=$JAVA_8_HOME
@skipzero
skipzero / 0_reuse_code.js
Created July 26, 2016 01:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console