View pinboard_roam_converter.rb
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
#!/usr/bin/env ruby -w | |
# frozen_string_literal: true | |
# | |
# usage | |
# chmod +x pinboard_converter.rb | |
# ./pinboard_converter.rb -t [pinboard_export_file] > tag_map.yml | |
# edit tag_map.yml | |
# ./pinboard_converter.rb [pinboard_export_file] tag_map.yml > [roam_import_file] | |
# import [roam_import_file] into Roam |
View gist:f5ff6c8944197283a6c1
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
(let [foo 1 | |
b 2]) | |
vs | |
(let [foo 1 | |
b 2]) | |
View gist:66d22092ab0dc8e1e328
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
Dear Theresa May, | |
I am writing again in response to the reply from your office (dated July 4th) to my message of July 2nd about neocotinids, bee deaths, and Syngenta. | |
As you correctly point out the science is not clear but in cases such as this we should be guided by the precautionary principle: | |
"The precautionary principle or precautionary approach states that if an action or policy has a suspected risk of causing harm to the public or to the environment, in the absence of scientific consensus that the action or policy is not harmful, the burden of proof that it is not harmful falls on those taking an action." -- http://en.wikipedia.org/wiki/Precautionary_principle. | |
The science is not clear but the potential risk to the environment is. The burden of proof falls on Syngenta and they have not made their case and, consequently, should not get a free pass. |
View gist:6af297b2cd438ef49c04
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
Dear Theresa May, | |
I am writing to ask you to please contact your colleagues at DEFRA and | |
press them not to allow Syngenta an exception to the ban on neocotinid | |
pesticides. Please see: | |
http://www.thepetitionsite.com/takeaction/512/323/304/ | |
for more information. |
View tweetcons.rb
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
#!/usr/bin/env ruby -w | |
require 'csv' | |
require 'json' | |
require 'ostruct' | |
require 'open-uri' | |
require 'optparse' | |
def setup_options | |
options = OpenStruct.new |
View gist:1443904
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
#ifdef TARGET_OS_MAC | |
typedef const struct __SecRandom * SecRandomRef; | |
const SecRandomRef kSecRandomDefault = NULL; | |
int SecRandomCopyBytes( SecRandomRef rnd, size_t count, uint8_t *bytes ); | |
int SecRandomCopyBytes( SecRandomRef rnd, size_t count, uint8_t *bytes ) { | |
int fd; |
View fibonacci.cpp
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
//===--- examples/Fibonacci/fibonacci.cpp - An example use of the JIT -----===// | |
// | |
// The LLVM Compiler Infrastructure | |
// | |
// This file is distributed under the University of Illinois Open Source | |
// License. See LICENSE.TXT for details. | |
// | |
//===----------------------------------------------------------------------===// | |
// | |
// This small program provides an example of how to build quickly a small module |
View gist:1080382
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
id result = [window callWebScriptMethod:@"testInject" withArguments:[NSArray arrayWithObject:post]]; | |
if( result == WebUndefined ) { <== line 66 | |
NSLog( @"No result" ); | |
} | |
NFNetworkBridge.m:66: error: expected expression before 'WebUndefined' |
View gist:1076906
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
- (IBAction)debugBindingsAction:(id)sender { | |
NSLog( @" network: %p", _network ); | |
NSLog( @" members: %p", [_network members] ); | |
id object = [[_networkController selectedObjects] objectAtIndex:0]; | |
NSLog( @"selected object: %p", object ); | |
id members = [object valueForKey:@"members"]; | |
NSLog( @" real: %p", members ); | |
} |
View gist:1066053
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
// .h | |
NSView *_memberView; | |
@property (nonatomic,retain) IBOutlet NSView *memberView; | |
// .m | |
- (void)windowDidLoad { | |
... | |
NSAssert( [self drawer], @"Drawer should not be nil!" ); | |
NSAssert( [self memberView], @"Member View should not be nil when we are setting it!" ); | |
[[self drawer] setContentView:[self memberView]]; |
NewerOlder