Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Alex Gorbatchev alexgorbatchev

🏠
Working from home
Block or report user

Report or block alexgorbatchev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexgorbatchev
alexgorbatchev / FastLEDDisk.ino
Created Sep 8, 2017 — forked from adammhaile/FastLEDDisk.ino
Examples of using angle and radius to select pixels on a circular pixel layout using FastLED
View FastLEDDisk.ino
#include "FastLED.h"
#define NUM_LEDS 255
#define DATA_PIN SPI_DATA
#define CLOCK_PIN SPI_CLOCK
// Define the array of leds
CRGB leds[NUM_LEDS];
@alexgorbatchev
alexgorbatchev / generate_cert.sh
Created Sep 9, 2014
Generate self signed https certificates for node.js express/hapi/etc
View generate_cert.sh
#!/bin/bash
openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem
@alexgorbatchev
alexgorbatchev / merge.sh
Created Sep 7, 2014
Merge one git repo into another preserving history
View merge.sh
#!/bin/bash
other_project=$1
git remote add -f $other_project ../$other_project
git merge -s ours --no-commit $other_project/master
git read-tree --prefix=$other_project -u $other_project/master
git commit -m "Merged $other_project"
View gist:9280173

Hey. Crazy kids. This probably needs to be that one event where you sort of realize: "Oh. Shit. Other people...like...use this & stuff. We need a damn road map and a release schedule. Stop smoking dabs all day, breh."

Now is also a great time to learn how to think about the potential ramifications a production push will have prior to making said production push. And, if your change might impact some or perhaps even all of the other people who use your technology, then some degree of coordination - perhaps an email? - would be nice. It's one of those things that will help make you look professional. I suck at professionalism. You have no idea. But, even I know this much.

Because, right now, I sort of feel like I'm asking some very rightfully fearful people to consider entrusting perhaps their actual career into the development of technology they need to succeed and thrive. And, I just started recommending Node.js - with a caveat - that npm basically sucks. I hate having to do that and it needs to stop.

So,

View gist:8428967
-----------------------------------------------------------------------------
"Efficient and Portable Combined Random Number Generators",
Pierre L'Ecuyer, Communications of the ACM, June, 1988 (v31 #6)
"Random Number Generators: Good Ones Are Hard To Find",
Park, Stephen K., and Miller, Keith W.,
Communications of the ACM, October, 1988.
(see below)
Conclusions :- horrible random (sic) number generators are used by people
@alexgorbatchev
alexgorbatchev / gist:8428232
Created Jan 14, 2014
MEAN folder structure
View gist:8428232
/node_modules
/package.json
/src
/node_modules
/client -> ../client
/server -> ../server
/shared -> ../shared
/client
/apps
/main
View install-graphite-ubuntu-10.04.sh
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
View comet_node.js (Nov 4, 2010 update)
var sys = require("sys");
var http = require("http");
var connections=[];
function update() {
if (connections.length) {
connections.forEach(function(c) {
sys.puts(c);
c.write('oi\n');
You can’t perform that action at this time.