I hereby claim:
- I am ahbou on github.
- I am ahbou (https://keybase.io/ahbou) on keybase.
- I have a public key whose fingerprint is C4FB 1E06 E840 050B 7969 713E 132A E782 14BC 87D7
To claim this, I am signing this object:
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
// generic select function | |
const $ = selector => […document.querySelectorAll(selector)]; | |
// usage | |
$(“div”).forEach(el => el.classList.add(“foo”)); |
// NSString_stripHtml.h | |
// Copyright 2011 Leigh McCulloch. Released under the MIT license. | |
#import <Foundation/Foundation.h> | |
@interface NSString (stripHtml) | |
- (NSString*)stripHtml; | |
@end |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
#import <Foundation/Foundation.h> | |
#include <dlfcn.h> | |
NSDictionary *FCPrivateBatteryStatus() | |
{ | |
static mach_port_t *s_kIOMasterPortDefault; | |
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options); | |
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT); | |
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name); |
I hereby claim:
To claim this, I am signing this object:
// List all fonts on iPhone | |
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
NSArray *fontNames; | |
NSInteger indFamily, indFont; | |
for (indFamily=0; indFamily < familyNames.count; ++indFamily) | |
{ | |
NSLog(@"Family name: %@", familyNames[indFamily]); | |
fontNames = [[NSArray alloc] initWithArray: | |
[UIFont fontNamesForFamilyName:familyNames[indFamily]]]; |
<? | |
/* | |
This is part of the Reprise framework, not yet released publicly. | |
Copyright 2013 Marco Arment. All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. |
# make sure homebrew is up to date | |
brew update | |
# update ruby version | |
brew upgrade ruby-build | |
# install latest stable version | |
rbenv install 2.3.3 | |
#set version as global | |
rbenv global 2.3.3 | |
#install bundler for that ruby version | |
gem install bundler |