Skip to content

Instantly share code, notes, and snippets.

View ryandhubbard's full-sized avatar

Ryan Hubbard ryandhubbard

  • Planet Art
  • Los Angeles
View GitHub Profile
@onlinemad
onlinemad / gcs.js
Created April 15, 2014 13:59
Sample of upload file to Google Cloud Stoage.
/**
* Sample of upload file to Google Cloud Stoage.
*
* 1. Setup a bucket and grant write permission for All Users on Google Cloud Stoage.
*
* 2. Install dependency 'request'
*
* 3. Set 'filename' and 'bucket'
*
* 4. Run!!
@samuelbeek
samuelbeek / addContact.swift
Created December 14, 2014 05:01
Add contact to address book in swift
func addUserToAddressBook(contact: User){
let stat = ABAddressBookGetAuthorizationStatus()
switch stat {
case .Denied, .Restricted:
println("no access to addressbook")
case .Authorized, .NotDetermined:
var err : Unmanaged<CFError>? = nil
var adbk : ABAddressBook? = ABAddressBookCreateWithOptions(nil, &err).takeRetainedValue()
if adbk == nil {
println(err)
@ArchieGoodwin
ArchieGoodwin / ContactsManager.swift
Created July 14, 2016 15:40
helper class for Contacts Framework
//
// ContactsManager.swift
// main
//
// Created by Nero Wolfe on 14/07/16.
// Copyright © 2016 Incoding. All rights reserved.
//
import UIKit
import Contacts
@leoloobeek
leoloobeek / get_gists.py
Created April 26, 2017 21:34
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
anonymous
anonymous / index.html
Created August 2, 2017 01:09
COMP484 // source http://jsbin.com/kofuduqike
<!DOCTYPE html>
<html>
<head>
<title>COMP484</title>
</head>
<body>
<form action="" method="post" id="theForm">
<fieldset>
<p>Use this form to calculate the sum.</p>
<div><label for="input1">Input Number</label>