Skip to content

Instantly share code, notes, and snippets.

View nicklozon's full-sized avatar

Nick Lozon nicklozon

View GitHub Profile
--[[
Each time sequencer is called it counts up from 1 to the upper bound, wrapping back to 1 upon reaching the maximum
--]]
function sequencer(maximum)
local i=0
return function() -- the function is returned and not executed here, so whatever operation that receives it will need to invoke it at some point for this code to execute
if i==maximum then
i=0
end
i=i+1
var mapSchema = require('./index.js');
// Basic example
var params = {'noise': 'Meow!'};
var schema = {'makeNoise': function(p) { return p.noise; }};
mapSchema(schema, params, function(ret) {
console.log(ret); //{ makeNoise: 'Meow!' }
});
var _ = require('lodash');
/**
* Takes two objects and a callback. One schema object that contains nested
* objects and functions, the other a paramater object with no constraints. The
* schema object is traversed recursively and functions are evaluated in place
* using the parameter object as the only parameter. The final evaluated object
* is passed to the callback.
* @param {Object} obj
* @param {Object} params
#
# Copyright (c) 2015 Matthew Bentley
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
'use strict';
var spawn = require('child_process').spawn;
var cpu = require('./available-configs/cpu.json');
// Use Gnu stdbuf to avoid buffering from commands
var child = spawn('stdbuf', ['-oL', 'bash', '-c', cpu.command]);
child.stdout.on('data', function(data) {
process.stdout.write(data);
#!/usr/bin/env python2
import requests
import unicodecsv
from datetime import date
dt = date.today().isoformat()
###########
# Skaters #
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
! special
*.foreground: #ffffff
*.background: #000000
*.cursorColor: #ffffff
! black
*.color0: #333333
*.color8: #3d3d3d
! red
shadow-exclude = [ "_GTK_FRAME_EXTENTS@:c" ];
compton -b -c -r 6 -l -7 -t -7 &
xrdb -merge ~/.Xresources &
feh --bg-scale ~/Wallpapers/quetzalhill.jpg &
tint2 &
conky &
synergyc nick-pc &
xset -b &