Skip to content

Instantly share code, notes, and snippets.

View atomicbird's full-sized avatar

Tom Harrington atomicbird

View GitHub Profile
@atomicbird
atomicbird / com.getsync.bittorrentsync.plist
Last active December 5, 2015 15:44 — forked from tjluoma/sync.com.tjluoma.bittorrentsync.plist
Keep BitTorrent Sync running on OS X. This version launches BitTorrent Sync directly instead of using /usr/bin/open, so that crashes will be detected.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<true/>
<key>SuccessfulExit</key>
<false/>
@atomicbird
atomicbird / gist:5216685
Last active December 15, 2015 06:29
WWDC page update, 2013-03-21
diff --git a/archives/wwdccheck.html b/archives/wwdccheck.html
index be95ffd..f92ed3a 100644
--- a/archives/wwdccheck.html
+++ b/archives/wwdccheck.html
@@ -60,7 +60,7 @@
var s_account="appleglobal,appleusdeveloper"
</script>
-<script type="text/javascript" src="https://ssl.apple.com/metrics/scripts/s_code_h.js"></script>
+<!-- <script type="text/javascript" src="https://ssl.apple.com/metrics/scripts/s_code_h.js"></script> -->
@atomicbird
atomicbird / gist:5250398
Last active December 15, 2015 11:08
WWDC page update, 2013-03-26
diff --git a/archives/wwdccheck.html b/archives/wwdccheck.html
index f92ed3a..713b830 100644
--- a/archives/wwdccheck.html
+++ b/archives/wwdccheck.html
@@ -60,7 +60,7 @@
var s_account="appleglobal,appleusdeveloper"
</script>
-<!-- <script type="text/javascript" src="https://ssl.apple.com/metrics/scripts/s_code_h.js"></script> -->
+<script type="text/javascript" src="https://www.apple.com/metrics/scripts/s_code_h.js"></script>
@atomicbird
atomicbird / gist:5327568
Created April 6, 2013 20:46
WWDC Page update, 2013-04-06
diff --git a/archives/wwdccheck.html b/archives/wwdccheck.html
index 713b830..93d4f4f 100644
--- a/archives/wwdccheck.html
+++ b/archives/wwdccheck.html
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=1024" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="icon" href="/favicon.ico" />
-<link rel="stylesheet" href="https://devimages.apple.com.edgekey.net/assets/core/styles/base.css" type="text/css" />
+<link rel="stylesheet" href="/assets/core/styles/base.css" type="text/css" />
struct x {
int y;
};
@interface Game : NSObject {
char fields[9];
BOOL singlePlayer;
BOOL isPlayerOne;
BOOL wasPlayerOne;
long int played;
@atomicbird
atomicbird / ManagedObjectDeletionFiringFault.swift
Created March 5, 2018 23:20 — forked from AndrewBennet/ManagedObjectDeletionFiringFault.swift
A Swift playground demonstrating that deleting an NSManagedObject causes a fault to fire
import CoreData
import PlaygroundSupport
// Build a simple model in code for demo purposes.
// The model has a single entity called "Entity" with a single optional string attribute called "testAttribute".
// There are no relationships in the model.
let model = NSManagedObjectModel()
let entity = NSEntityDescription()
entity.name = "Entity"
let testAttribute = NSAttributeDescription()
@atomicbird
atomicbird / UIView+comment.swift
Created May 16, 2019 16:50
Add a comment field in Xcode storyboards
@IBInspectable var comment: String {
set {}
get { return "" }
}
@atomicbird
atomicbird / uberfor.sh
Last active July 18, 2019 15:22
It's like Uber for howdy.
#!/bin/sh
say "Warming up the pitch engine..."
for word in `sort -R /usr/share/dict/words`
do
PITCH="It's like Uber for $word."
echo $PITCH
say $PITCH
sleep 1
done
@atomicbird
atomicbird / purge_advertisers.md
Last active July 18, 2019 15:44 — forked from scarlac/purge_advertisers.md
Facebook Hack: Purge list of "Advertisers you've interacted with"

For those of you who want to remove all in “Advertisers you’ve interacted with”:

  1. Go to https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen and open the section "Advertisers you've interacted with"
  2. Open Web Inspector
  3. Copy-paste this script to load all advertisers: smt=setInterval(() => {let x=document.querySelector('div[shade=medium]'); x ? x.click() : clearInterval(smt), console.log('done')}, 1000)
  4. It will output a number. Wait for it to say “done” in the console. This may take a long time. you'll notice the scrollbar changing while it's loading all advertisers.
  5. Copy-paste this and press enter: document.querySelectorAll('[data-tooltip-content="Hide all ads from this advertiser"]').forEach(el =&gt; el.click()). Note Facebook has changed the text on the button a few times, so if this has no effect, you may need to edit the command. Hover over the "x" icon on any advertiser until a pop-up tooltip appears. Make the double-quoted text in this c
@atomicbird
atomicbird / NSObject+setValuesForKeysWithJSONDictionary.h
Created January 11, 2012 02:35
NSObject category for handling JSON dictionaries. Described in detail at http://www.cimgf.com/2012/01/11/handling-incoming-json-redux/
//
// NSObject+setValuesForKeysWithJSONDictionary.h
// SafeSetDemo
//
// Created by Tom Harrington on 12/29/11.
// Copyright (c) 2011 Atomic Bird, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>