(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
function Record (template) { | |
if (Record.prototype.isPrototypeOf(this)) { | |
var struct = this; | |
Object.keys(template).forEach(function (key) { | |
Object.defineProperty(struct, key, { | |
enumerable: true, | |
writable: true, | |
value: template[key] | |
}); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Forge = require 'forge-di' | |
MonkeyPatcher = require './util/MonkeyPatcher' | |
Store = require './services/Store' | |
# Create the Forge and monkey-patch React.createClass() so it can inject dependencies. | |
forge = new Forge() | |
MonkeyPatcher.patchReact(forge) | |
# Register component bindings | |
forge.bind('store').to.type(Store) |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
// | |
// Trie.swift | |
// SceneTest | |
// | |
// Created by Greg Titus on 6/7/14. | |
// Copyright (c) 2014 The Omni Group. All rights reserved. | |
// | |
// This is essentially the same data structure as OFTrie in OmniFoundation, except that the OmniFoundation version is mutable and ephemeral, | |
// and this version is immutable and persistent. Every time you add a string to the trie, it replaces all the nodes along the string's path |
enum Either<A, B> { | |
case Left(A) | |
case Right(B) | |
} | |
func isLeft<A,B>(it : Either<A,B>) -> Bool { | |
switch it { case .Left: return true; case .Right: return false } | |
} | |
func isRight<A,B>(it : Either<A,B>) -> Bool { |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
me@redacted:~$ python | |
Python 2.7.3 (default, Mar 14 2014, 11:57:14) | |
[GCC 4.7.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import ssl | |
>>> | |
[1]+ Stopped python | |
me@redacted:~$ ps | |
PID TTY TIME CMD | |
24815 pts/1 00:00:00 bash |
#!/usr/bin/env python | |
# Quick and dirty demonstration of CVE-2014-0160 by | |
# Jared Stafford ([email protected]) | |
# Modified so that it finds cookies | |
import sys | |
import struct | |
import socket | |
import time | |
import select |