Skip to content

Instantly share code, notes, and snippets.

View longda's full-sized avatar
🌴

David Long longda

🌴
View GitHub Profile
@cowboy
cowboy / recruiter-stalker.log
Last active May 8, 2018 12:51
recruiter stalker
[12:06] <TrevorTSG> Ben!
[12:07] <TrevorTSG> I am a technical recruiter, ipsofacto, I have no idea what's
going on here, but I have a position for a jQuery stud up
for grabs if you're game
[12:07] <TrevorTSG> here in the Boston area
[12:09] <ben_alman> nope
[12:09] <TrevorTSG> But you have to give me props for stalking you all the way
into a jquery chat room, right?
[12:15] TrevorTSG left IRC. (Ping timeout: 250 seconds)
@coryhouse
coryhouse / authorApi.js
Created August 6, 2015 13:04
Mock Author API for "Building Applications with React and Flux" on Pluralsight
"use strict";
//This file is mocking a web API by hitting hard coded data.
var authors = require('./authorData').authors;
var _ = require('lodash');
//This would be performed on the server in a real app. Just stubbing in.
var _generateId = function(author) {
return author.firstName.toLowerCase() + '-' + author.lastName.toLowerCase();
};
@coryhouse
coryhouse / gist:9e09fa659cf89e4eddef
Created August 6, 2015 13:09
Author data for "Building Applciations with React and Flux" on Pluralsight
module.exports = {
authors:
[
{
id: 'cory-house',
firstName: 'Cory',
lastName: 'House'
},
{
id: 'scott-allen',
@xem
xem / readme.md
Last active May 11, 2024 23:57
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

@rcarmo
rcarmo / thespian-raft.py
Created August 7, 2016 08:17
The Raft leader election protocol, implemented atop GoDaddy's Thespian actor library
from thespian.actors import *
from datetime import datetime, timedelta
from logging import getLogger, basicConfig, DEBUG
from random import randint
basicConfig(level=DEBUG)
log = getLogger(__name__)
class Postman(Actor):