I hereby claim:
- I am davepeck on github.
- I am davepeck (https://keybase.io/davepeck) on keybase.
- I have a public key whose fingerprint is A93D 3832 FDB8 179C 0BDE A8EB 876D DC96 FA1F 58D8
To claim this, I am signing this object:
def interleave(iterables, cmp=None, key=None, reverse=False): | |
""" | |
Given a collection of iterables, walk through them in | |
parallel, at each step yielding the current value | |
that comes first in the sort order, and advancing | |
that single iterator. | |
If each iterable is already sorted, this will produce | |
a total ordering. If not, it produces a 'greedy' ordering | |
// | |
// BinaryDataScanner.swift | |
// | |
// Created by Dave Peck on 7/20/14. | |
// Copyright (c) 2014 Dave Peck. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// |
Alien in base 16: 183C7EDBFF245AA5 | |
Alien in base 32: 1GF3URFVI8ML5 | |
Alien in base 36: D9NURFZQYYSL | |
Alien in morse, base 16: ['.----', '---..', '...--', '-.-.', '--...', '.', '-..', '-...', '..-.', '..-.', '..---', '....-', '.....', '.-', '.-', '.....'] | |
Alien in morse, base 32: ['.----', '--.', '..-.', '...--', '..-', '.-.', '..-.', '...-', '..', '---..', '--', '.-..', '.....'] | |
Alien in morse, base 36: ['-..', '----.', '-.', '..-', '.-.', '..-.', '--..', '--.-', '-.--', '-.--', '...', '.-..'] |
I hereby claim:
To claim this, I am signing this object:
@property (strong, nonatomic) id observer; | |
// ... | |
- (void)startListening | |
{ | |
__weak MyClass *wself = self; | |
self.observer = | |
[[NSNotificationCenter defaultCenter] addObserverForName:@"foo" object:nil queue:nil usingBlock:^(NSNotification *note){ | |
MyClass *sself = wself; |
static OSStatus | |
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, | |
uint8_t *signature, UInt16 signatureLen) | |
{ | |
OSStatus err; | |
SSLBuffer hashOut, hashCtx, clientRandom, serverRandom; | |
uint8_t hashes[SSL_SHA1_DIGEST_LEN + SSL_MD5_DIGEST_LEN]; | |
SSLBuffer signedHashes; | |
uint8_t *dataToSign; | |
size_t dataToSignLen; |
# The OSX Mavericks upgrade installer can totally corrupt group ownership of | |
# files in user home directories. Typically, it looks like the Mavericks installer | |
# simply sets (most? all?) of the files to the same gid as your uid, which may be nonsense. | |
# Specifically, most single-user OS X installs have uid=501 for the default user, | |
# so gid is typically 501 too. | |
# Step 0: make sure your user is still part of its group: | |
dseditgroup -o edit -t user -a <your_user_name> <your_user_name> | |
# (The second occurence of <your_user_name> is actually the group name) |
#include <stdio.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <sys/kern_control.h> | |
#include <sys/sys_domain.h> | |
#include <sys/ioctl.h> | |
#include <net/if_utun.h> |
Function::event = (name, initial_cb) -> | |
@prototype["fire_#{name}"] = (args...) -> | |
@__callbacks ?= {} | |
@__callbacks[name] ?= [] | |
initial_cb.apply @, args if initial_cb? | |
callback.apply @, args for callback in @__callbacks[name] | |
@ | |
@prototype["on_#{name}"] = (cb) -> | |
@__callbacks ?= {} | |
@__callbacks[name] ?= [] |
Function::property = (prop, desc) -> | |
Object.defineProperty this.prototype, prop, desc | |
class Foo | |
@property 'neat' | |
get: -> | |
42 | |
class Bar extends Foo | |
@property 'neat' |