I hereby claim:
- I am adamcooke on github.
- I am adamcooke (https://keybase.io/adamcooke) on keybase.
- I have a public key whose fingerprint is 4A56 6CF7 DB1B 01B1 55EE 6911 D182 55F5 F117 FE7B
To claim this, I am signing this object:
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016 | |
respawn | |
exec sh -c 'cd /opt/ghost/app && npm start' | |
// Create a new layer which is the width of the device and with a heigh | |
// of 0.5px. | |
CALayer *topBorder = [CALayer layer]; | |
topBorder.frame = CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 0.5f); | |
// Set the background colour of the new layer to the colour you wish to | |
// use for the border. | |
topBorder.backgroundColor = [[UIColor blueColor] CGColor]; | |
// Add the later to the tab bar's existing layer |
// When a user accepts push notifications on the device, this method is called and it makes an API request | |
// to the Sirportly API with the token. | |
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { | |
NSString *deviceTokenAsString = [NSString stringWithFormat:@"%@", deviceToken]; | |
deviceTokenAsString = [deviceTokenAsString stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]]; | |
deviceTokenAsString = [deviceTokenAsString stringByReplacingOccurrencesOfString:@" " withString:@""]; | |
NSDictionary *params = @{@"device_type": @"iphone", @"identifier": deviceTokenAsString}; | |
[[SPAPIClient sharedClient] makeRequest:@"mobile/register" params:params completion:^(SPAPIResponse *response) { | |
// Done - no need to actually do anything. |
I hereby claim:
To claim this, I am signing this object:
class AddressBook | |
def contacts | |
@contacts ||= [] | |
end | |
def self.load_from_path(path) | |
# Create a new AddressBook instance | |
address_book = self.new | |
# Create a new AddressBookDSL instance |
firewall { | |
all-ping enable | |
broadcast-ping disable | |
group { | |
ipv6-network-group ipv6-allowed-networks { | |
ipv6-network 2a00:67a0:a:6::/64 | |
ipv6-network 2a00:67a0:a:2::138/128 | |
ipv6-network 2a00:67a0:a:13::/64 | |
} | |
network-group allowed-networks { |
# | |
# This is a unicorn configuration file which works well when deploying | |
# Rails applications to Viaduct. It allows a certain level of configuration of | |
# your Unicorn processes using environment variables. This should be placed | |
# in config/unicorn.rb within your application. | |
# | |
# Last modified: 2015-25-01 | |
# | |
app_root = File.expand_path('../../', __FILE__) |
< HTTP/1.1 404 Not Found | |
< Date: Tue, 03 Feb 2015 21:26:29 GMT | |
< Vary: Accept-Encoding | |
< Content-Length: 298 | |
< Content-Type: text/html; charset=iso-8859-1 | |
< | |
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | |
<html><head> | |
<title>200 OK</title> | |
</head><body> |
require 'bundler/setup' | |
require 'active_record' | |
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" | |
ActiveRecord::Migration.create_table :users do |t| | |
t.string :first_name, :last_name | |
t.timestamps :null => false | |
end | |
class User < ActiveRecord::Base | |
end |