Skip to content

Instantly share code, notes, and snippets.

View matef's full-sized avatar

Mahmoud Abdelsamie matef

View GitHub Profile
@conorhastings
conorhastings / simple-redux.js
Last active June 11, 2021 01:36
A very (read: don't do this) simple implementation of redux
/*
* The reason for this is just a thought exercise
* often people(myself super included) are so confused
* when trying something new, but breaking it down
* to it's simplest existence can be the best way to understand
*/
function createStore(reducer, initState) {
let state = initState;
let subscribers = [];
import java.nio.ByteBuffer
import scala.util.Failure
import scala.util.Success
import scala.util.Try
import org.apache.commons.codec.binary.Hex
import org.jboss.netty.buffer.ChannelBuffers
import org.joda.time.DateTime
import org.joda.time.DateTimeZone
@eddieantonio
eddieantonio / fabfile.py
Created September 28, 2013 01:06
Fabric: task to authorize your SSH key on a remote host.
"""
Installs your SSH key on other hosts. A fabfile for lazy people.
"""
from fabric.api import task, run, put, env, cd
# Use sh instead of bash.
env.shell = '/bin/sh -l -c'
@task