Skip to content

Instantly share code, notes, and snippets.

View vladikoff's full-sized avatar
🚀
🧇

Vlad Filippov vladikoff

🚀
🧇
View GitHub Profile
@k2cCreations
k2cCreations / Red to White
Last active August 29, 2015 13:57
Lights will cycle from one side to the other, fading red to white, then back to red
First enter "shell" without (")
Second enter "sudo su" Without (")
ectool lightbar seq stop
ectool lightbar 4 00 00 00
while :
do
ectool lightbar 0 ff 00 00
@tbranyen
tbranyen / jscs.json
Created February 10, 2014 19:43
My JSCS style configuration.
{
"maximumLineLength": 80,
"validateJSDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
},
@tbranyen
tbranyen / defines.js
Last active February 11, 2024 20:41
AMD Flavors.
// Anonymous empty module.
define();
// Anonymous values.
define({});
define(true);
define(1234);
define(null);
define(undefined);
From 626c8ac5634c543a3e922e60c83b0e2dfdd5b094 Mon Sep 17 00:00:00 2001
From: Timothy J Fontaine <[email protected]>
Date: Mon, 11 Nov 2013 02:09:12 +0000
Subject: [PATCH] src: HandleWrap::OnClose needs HandleScope
---
src/handle_wrap.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
@dan-blanchard
dan-blanchard / .1.miniconda.md
Last active December 11, 2019 22:38
Quicker Travis builds that rely on numpy and scipy using Miniconda

For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.

A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s

@shama
shama / setfromdb.js
Last active December 24, 2015 01:29
Grunt example setting config from a db
grunt.initConfig({
db: {
// Books will be populated when setfromdb is ran
books: []
},
other: {
target: {
options: {
// Now when other:target is ran it will consume db.books
books: '<%= db.books %>'
@brianloveswords
brianloveswords / eff-you-region-lock.md
Last active December 22, 2015 15:08
Defeating region lock

Prerequisites

  • Somewhat modern version of OpenSSH
  • Server you have SSH access to in the region you want to stream from.

Bummed about region lock? Start up your terminal and do this:

$ ssh -N -D 9999 yourserver.com
@techieBrandon
techieBrandon / gist:6190945
Created August 9, 2013 03:25
Working solution for local dev CI issue
tr-tz-mbp-2:guiMbb brandonwilburn$ cat Gruntfile.coffee
module.exports = (grunt) ->
path = require('path')
gruntConfig =
pkg: grunt.file.readJSON('package.json')
exec:
generateAppResourcesJson:
const windowUtils = require("window-utils");
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
exports.Menuitem = function Menuitem(options) {
new windowUtils.WindowTracker({
onTrack: function (window) {
if ("chrome://browser/content/browser.xul" != window.location) return;
@Protonk
Protonk / prng.js
Last active August 31, 2024 17:14
Various PRNGs, implemented in javascript.
// Linear Congruential Generator
// Variant of a Lehman Generator
var lcg = (function() {
// Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes
// m is basically chosen to be large (as it is the max period)
// and for its relationships to a and c
var m = 4294967296,
// a - 1 should be divisible by m's prime factors
a = 1664525,
// c and m should be co-prime