Skip to content

Instantly share code, notes, and snippets.

View incanus's full-sized avatar

Justin R. Miller incanus

View GitHub Profile
anonymous
anonymous / index.html
Created February 5, 2014 23:48
Presentation
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
font-family: 'Helvetica';
letter-spacing:-5px;
justin: so static api
yh: don't use it for this
justin: ok
yh: or i will body slam you next time i see you
@tylor
tylor / tweet-counts.js
Created December 16, 2012 23:07
Scan your Twitter archive to get a basic count of the people you've talked to and the words that you've used.
/*
* Scan your official Twitter archive to get a basic count of the
* people you've talked to and the words that you've used.
*
* $ node tweet-counts.js ~/path/to/tweets-archive/
*
*/
var fs = require('fs');
var base = process.argv[2].replace(/\/$/, ''); // Strip trailing slash.
var Grailbird = { data: {} }; // The Twitter archive uses this.

A Proposal to improve App Store Approvals

Dear Apple,

As developers on the Mac and iOS platforms, we think its time to reflect on Apple's App Store review policies.

There are some wonderful things about the App Stores' protection mechanisms. We believe Apple's policy of not allowing every App on the App Stores, while occasionally problematic, acts overall in the interest of users and high quality software. We're happy that Apple has the ability to delist and remove software that violates user privacy, contains egregious security issues, or otherwise puts users and their data at risk.

That said, we believe that the current policy of manually reviewing App updates places an undue burden on developers, and ultimately harms user experience. It should be reformed.

Reviewing App Updates Harms Developers and Users

@quicklywilliam
quicklywilliam / kudo.bash
Created September 22, 2015 23:58
Kudo- Use Knock to run a command as root/sudo
function kudo {
export fullcmd=""
for i in "$@"; do export fullcmd="$fullcmd '${i}'";done
osascript -s so -e "do shell script \"$fullcmd 2>&1\" with administrator privileges"
}
@cruffenach
cruffenach / gist:45a98ce6f2a49b5e859b
Last active June 30, 2018 13:23
Guilloche Drawing in Playgrounds
// Playground - noun: a place where people can play
import Cocoa
import QuartzCore
import XCPlayground
import Accelerate
func showMessage(message : String, messageIndex: Integer) {
let attributedString = NSAttributedString(string: message, attributes: NSDictionary(object: NSFont(name: "HelveticaNeue-Light", size: 24), forKey: NSFontAttributeName))
XCPCaptureValue("Message \(messageIndex)", attributedString)
@natecook1000
natecook1000 / nshipster-new-years-2016.md
Last active July 10, 2018 19:24
NSHipster New Year's 2016

Greetings and salutations, NSHipsters!

As the year winds down, it's a tradition here at NSHipster to ask you, dear readers, to offer up your favorite tricks and tips from the past year as gifts to your fellow hipsters. With iOS 9, El Capitan, brand new watch- and tvOS's, and the open-sourcing of some minor Apple-related tech, there's bound to be lots to share.

Submit your favorite piece of Swift or @objc trivia, helpful hints, unexpected discoveries, useful workarounds, useless fascinations, or anything else you found cool this year. Just comment below!

If you need inspiration, try [the list from last year][2015], or [from the year before][2014], or [from the year before that][2013].

@ziadoz
ziadoz / icloud_tabs_to_csv.sh
Last active May 26, 2020 20:07
Export iCloud Tabs/URLs to CSV
#!/usr/bin/env bash
alias icloud_tabs='sqlite3 -header -csv ~/Library/Safari/CloudTabs.db "select ctd.device_name, ct.title, ct.url from cloud_tabs as ct inner join cloud_tab_devices as ctd on ctd.device_uuid = ct.device_uuid order by device_name asc, position asc"'
# Output to CSV file:
icloud_tabs > icloud_tabs.csv
# Unique CSV:
sort -u icloud_tabs.csv -o icloud_tabs_unique.csv
# Merge CSVs:
@mrflip
mrflip / maximum_battery_life.md
Created March 19, 2012 08:32
maximum battery life checklist -- use before a long plane flight

Max Battery Life Checklist

Here is a checklist to follow if you want maximum battery life -- for instance if you're about to get on a long plane flight.

10 hour battery life on a non-SSD Macbook Pro 17"

Low power use checklist

With power connected:

// Props to the fine folks on this thread http://bbs.iosre.com/forum.php?mod=viewthread&tid=694
//
// Example output of a call to dailyUsageStasticsForBundleIdentifier or weeklyUsageStasticsForBundleIdentifier
// Inline comments are educated guesses at meaning
// {
// Airdrop = 0; // Has App used Airdrop
// Airplay = 0; // Has App used Airplay
// BBCondition = 0; // ?? BB = Backboard? This number is a float (ie 24.8766038700895)
//
// // No idea what the below units are, or what BLD means