Skip to content

Instantly share code, notes, and snippets.

View EdwardReed's full-sized avatar
🙂
I write code here

Edward Reed II EdwardReed

🙂
I write code here
View GitHub Profile
@jwo
jwo / registrations_controller.rb
Created September 30, 2011 23:11
API JSON authentication with Devise
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else
@tristen
tristen / README.md
Last active February 23, 2019 19:51
Spotlight

##Spotlight

Create a spotlight effect using canvas over specified co-ordinates.

Contributors

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@skmetz
skmetz / careerbuilder_class_links.md
Last active November 27, 2022 01:29
CareerBuilder class links
@luk3thomas
luk3thomas / gulpfile.coffee
Last active August 29, 2015 14:11
working example of gulp, coffeescript, react, jsx, browserify
sys = require "sys"
exec = require("child_process").exec
spawn = require("child_process").spawn
browserify = require "browserify"
watchify = require "watchify"
coffee_react = require "coffee-reactify"
gulp = require "gulp"
jade = require "gulp-jade"
plumber = require "gulp-plumber"
reload = require "gulp-livereload"
@tenderlove
tenderlove / h2_puma.rb
Last active September 4, 2023 17:30
Demo HTTP/2 server with Puma
require 'socket'
require 'openssl'
require 'puma/server'
require 'ds9'
class Server < DS9::Server
def initialize socket, app
@app = app
@read_streams = {}
@write_streams = {}
require 'webrick'
require 'webrick/https'
require 'ds9'
class HTTP2Server < WEBrick::HTTPServer
SETTINGS = [ [DS9::Settings::MAX_CONCURRENT_STREAMS, 100] ]
class HTTP2Response < WEBrick::HTTPResponse
def initialize config, ctx, stream_id
@ctx = ctx
@dmvaldman
dmvaldman / FRPandPhilosophy.md
Last active February 23, 2024 16:24
Descartes, Berkeley and Functional Reactive Programming

Descartes, Berkeley and Functional Reactive Programming

By @dmvaldman

Functional Reactive Programming (FRP) is generating buzz as an alternative to Object Oriented Programming (OOP) for certain use cases. However, an internet search quickly leads a curious and optimistic reader into the rabbit-hole of monads, functors, and other technical jargon. I’ve since emerged from this dark and lonely place with the realization that these words are mere implementation details, and that the core concepts are far more universal. In fact, the groundwork was laid down many centuries before the first computer, and has more to do with interpretations of reality, than structuring programs. Allow me to explain.

There’s an old thought experiment that goes like this:

Tree