Skip to content

Instantly share code, notes, and snippets.

MUTHR:tmp teo$ ./test.sh
Note: checking out 'c79dddd'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

Notes on "Making your own ipfs service"

Update (HT Cryptix): If we make sure we have the net/context package from github by running

go get golang.org/x/net/context

and then change the import statements in the server and client source from

import ( "code.google.com/p/go.net/context" )
@NeoTeo
NeoTeo / crashBang
Last active August 29, 2015 14:13
Crashes compiler with "Global is external, but doesn't have external or weak linkage!"
import Cocoa
class foo {
var baz = false
func test() {
var bar: Int = 1 {
didSet {
if baz == true && bar == 2 {
@NeoTeo
NeoTeo / project-Prefix.pch
Created January 8, 2015 15:39
Cocoa/Objective-C Macro for tagged debug logging.
// Here are the definitions of the tags used to toggle the various debug logs.
//#define TGLOG_ALL
#define TGLOG_TMP
#define TGLog(tag, msg, ...) TGLog_eval_(TGLog_do_, tag, msg, ## __VA_ARGS__)
#define TGLog_eval_(macro, ...) macro(__VA_ARGS__)
#define TGLog_do_(tag, msg, ...) \
(#tag[0] == 0 || #tag[0] == '1') ? NSLog(@"%@",[NSString stringWithFormat:msg, ## __VA_ARGS__]) : (void)0;
@NeoTeo
NeoTeo / HHGTTG intro
Last active August 29, 2015 14:06
Douglas Adams' comments on Apple Pay and Apple Watch.
Far out in the uncharted backwaters of the unfashionable end
of the Western Spiral arm of the Galaxy lies a small
unregarded yellow sun.
Orbiting this at a distance of roughly ninety-two million
miles is an utterly insignificant little blue green planet whose
ape-descended life forms are so amazingly primitive that
they still think digital watches are a pretty neat idea.
This planet has – or rather had – a problem, which was