Verifying that +cel is my Bitcoin username. You can send me #bitcoin here: https://onename.io/cel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <StandardFile.h> | |
#include <Memory.h> | |
#include <Files.h> | |
#include <Devices.h> | |
OSErr MyOpenDF(ConstStr255Param fileName, short vRefNum, short *refNum) | |
{ | |
OSErr oe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: text/plain'); | |
$secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
$branch = 'master'; | |
$hub_signature = @$_SERVER['HTTP_X_HUB_SIGNATURE']; | |
if (!$hub_signature) { | |
http_response_code(403); | |
exit('missing signature'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# update-cjdns | |
# Usage: put in crontab: | |
# 0 0 * * * /usr/local/sbin/update-cjdns | |
cd /opt/cjdns || exit 1 | |
git pull | grep -q 'Already up-to-date' && exit 0 | |
tmp="$(mktemp)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simulate onhashchange support in all browsers | |
"onhashchange" in window || (function () { | |
var lastHash = ''; | |
function pollHash() { | |
if (lastHash !== location.hash) { | |
lastHash = location.hash; | |
var event = document.createEvent("HTMLEvents"); | |
event.initEvent("hashchange", true, false); | |
document.body.dispatchEvent(event); | |
if (typeof onhashchange == "function") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>swarm!</title> | |
<script type="text/javascript" language=JavaScript src="buzzWorker.js"></script> | |
<style> | |
.thing { | |
position:absolute; | |
} | |
.dying { | |
color:#ff0000; | |
font-weight:bold; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BeautifulSoup import BeautifulSoup, NavigableString | |
from waveapi import element | |
import re | |
import htmlentitydefs | |
IMAGE_PLACEHOLDER = '***{{((IMAGE_ELEMENT))}}***' | |
def append_content_to_blip(blip, content, type=None): | |
if type == 'text/plain': | |
# Replace characters that Wave breaks on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
// one way | |
foo ? bar.doSomething(el) : bar.doSomethingElse(el); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Classy - Simple and Fast Javascript Inheritance. | |
(No fancy stuff) | |
Inspiration: | |
http://ejohn.org/blog/simple-javascript-inheritance/ | |
http://valums.com/javascript-oop/ | |
http://www.broofa.com/blog/2009/02/javascript-inheritance-performance/ | |
Example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Access Code Generator & Validator | |
// API: | |
// string generateAccessCode() | |
// Boolean validateAccessCode(codeString) | |
(function () { | |
// configure: | |
var difference = 5; |
OlderNewer