Skip to content

Instantly share code, notes, and snippets.

@billglover
billglover / jsyk_bot_privacy.md
Created February 18, 2017 15:24
Privacy Policy for the JSYK Bot

This bot is for educational purposes. The only personal data that we retrieve from Facebook is the name of users who send messages to the bot. This data is used to personalise replies and we do not store this data or transmit it to third parties. The bot itself is hosted on AWS in Ireland and data retrieved may appear in diagnostic logs.

@billglover
billglover / keybase.md
Created January 15, 2017 18:47
key base.io verification

Keybase proof

I hereby claim:

  • I am billglover on github.
  • I am billglover (https://keybase.io/billglover) on keybase.
  • I have a public key whose fingerprint is 8880 C31E 00BC 4F55 DB20 29D9 845F 3ED6 0173 678F

To claim this, I am signing this object:

@billglover
billglover / all_the_pies.sh
Created July 30, 2016 21:46
List the IP addresses for all Raspberry Pis on the network (range 192.168.2.0/24)
sudo fing -r1 -n 192.168.2.0/24 -o table,csv | awk -F ";" '$7 ~ /Raspberry/ {print $1}'
@billglover
billglover / user-data.sh
Last active December 20, 2015 23:03
Install Apache and clone a simple website to demonstrate setting up an AWS web server.
#!/bin/bash
# update package repository
yum -y update
# upgrade all installed packages
yum -y upgrade
# install Apache httpd server
yum -y install httpd
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Hello World</h1>
</body>
</html>

Keybase proof

I hereby claim:

  • I am billglover on github.
  • I am billglover (https://keybase.io/billglover) on keybase.
  • I have a public key whose fingerprint is 8880 C31E 00BC 4F55 DB20 29D9 845F 3ED6 0173 678F

To claim this, I am signing this object:

@billglover
billglover / AppDelegate.swift
Last active August 29, 2015 14:21
Using application:handleWatchKitExtensionRequest:reply: to pass UIColor
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!) -> Void)!) {
// expect a request String from the parent application
// send a response UIColor in return
// Note: you may not see these in the console if debugging WatchKit
@billglover
billglover / InterfaceController.swift
Last active August 29, 2015 14:21
Using openParentApplication:reply: to pass UIColor
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBAction func ButtonPress() {
var userInfo: [NSObject: AnyObject] = [:]
userInfo["request"] = "This is a string"
@billglover
billglover / AppDelegate.swift
Created May 27, 2015 05:54
Using application:handleWatchKitExtensionRequest:reply: to pass Strings
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!) -> Void)!) {
// expect a request String from the parent application
// send a response String in return
// Note: you may not see these in the console if debugging WatchKit
@billglover
billglover / InterfaceController.swift
Last active August 29, 2015 14:21
Using openParentApplication:reply: to pass Strings
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBAction func ButtonPress() {
var userInfo: [NSObject: AnyObject] = [:]
userInfo["request"] = "This is a string"