Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Theill theill

View GitHub Profile
View commit-msg.sh
#!/bin/bash
filename="$1"
gitmoji=(:art: :zap: :fire: :bug: :ambulance: :sparkles: :pencil: :rocket: :lipstick: :tada: :white_check_mark: :lock: :apple: :penguin: :checkered_flag: :robot: :green_apple: :bookmark: :rotating_light: :construction: :green_heart: :arrow_down: :arrow_up: :construction_worker: :chart_with_upwards_trend: :recycle: :whale: :heavy_plus_sign: :heavy_minus_sign: :wrench: :globe_with_meridians: :pencil2: :poop: :rewind: :twisted_rightwards_arrows: :package: :alien: :truck: :page_facing_up: :boom: :bento: :ok_hand: :wheelchair: :bulb: :beers: :speech_balloon: :card_file_box: :loud_sound: :mute: :busts_in_silhouette: :children_crossing: :building_construction: :iphone: :clown_face: :egg: :see_no_evil: :camera_flash: :alembic: :mag: :wheel_of_dharma: :label: :seedling: :triangular_flag_on_post: :goal_net: :dizzy: :wastebasket:)
lineno=0
error() {
echo "$1"
echo
echo "--"
echo "Please refer to https://gitmoji.carloscuesta.me/ for required gitmoji info and https://chris.beams.io/posts
View keybase.md

Keybase proof

I hereby claim:

  • I am theill on github.
  • I am theill (https://keybase.io/theill) on keybase.
  • I have a public key ASBc89GQ2sdiqWkaj9jB0NIVAEbW5AL7lIHXLiM82fSFago

To claim this, I am signing this object:

View gist:a1ad576965bf3952471f
Pod::Spec.new do |s|
s.name = "AFAmazonS3Client"
s.version = "2.0.0"
s.summary = "AFNetworking Client for the Amazon S3 API."
s.homepage = "https://github.com/AFNetworking/AFAmazonS3Client"
s.social_media_url = "https://twitter.com/AFNetworking"
s.license = 'MIT'
s.author = { "Mattt Thompson" => "m@mattt.me" }
s.source = { :git => "https://github.com/AFNetworking/AFAmazonS3Client.git",
:tag => "2.0.0" }
View SwatchITime.java
/**
* @(#)SwatchITime.java
* @version 0.5 01/09/99
* @version 1.0 01/10/99
* @author Peter Theill
*
* This Applet displays current time using Internet Time: a new
* international timeformat invented by Swatch. The SwatchITime
* applet automatically updates every second (or in userdefined
* intervals) to symbolize a running clock. Furthermore, you'll
View gist:8047432
Pod::Spec.new do |s|
s.name = 'UrbanAirship-iOS-SDK'
s.version = '2.1.0'
s.license = 'BSD'
s.platform = :ios
s.summary = 'A simple way to integrate Urban Airship services into your iOS applications.'
s.homepage = 'https://github.com/urbanairship/ios-library'
s.author = { 'Urban Airship' => 'support@urbanairship.com' }
s.source = { :git => 'https://github.com/urbanairship/ios-library.git', :tag => '2.1.0' }
View DRApiClient.m
- (void)expire:(NSString *)offerId success:(void (^)(BOOL))success failure:(ErrorBlock)failure {
[self deletePath:[NSString stringWithFormat:@"/offers/%@", offerId] parameters:nil
success:^(AFHTTPRequestOperation *o, id rsp) {
if (success) {
success(YES);
}
}
failure:[self handleError:failure]];
}
View DRApiClient.m
- (void)expire:(NSString *)offerId success:(void (^)(BOOL))success failure:(ErrorBlock)failure {
[self deletePath:[NSString stringWithFormat:@"/offers/%@", offerId] parameters:nil
success:^(AFHTTPRequestOperation *o, id rsp) {
if (success) {
success(YES);
}
}
failure:[self handleError:failure]];
}
View keep_releases.sh
releases_path=/data/sites/yoursite.com/releases # change this
keep_releases=5
versions=`ls -xt $releases_path`
releases=(${versions// / })
# check available number of versions in releases directory
releases_count=${#releases[@]}
if [ $releases_count -le $keep_releases ]
View gist:887630
welcome!
<input type="text" x-webkit-speech />
<style type="text/css" media="screen">
#pit-handbook {}
#pit-handbook ol {
margin: 0;
padding: 0;
View gist:716648
% defaults write com.apple.Xcode XCShowUndoPastSaveWarning NO
% defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "Commanigy"; }
You can’t perform that action at this time.