Skip to content

Instantly share code, notes, and snippets.

View jessesquires's full-sized avatar
🏴
free labor

Jesse Squires jessesquires

🏴
free labor
View GitHub Profile
@jessesquires
jessesquires / detweet.swift
Created January 15, 2019 17:56 — forked from mxcl/detweet.swift
Delete all tweets and favorites older than two months ago. Instructions in comment.
#!/usr/bin/swift sh
import Foundation
import PromiseKit // @mxcl ~> 6.5
import Swifter // @mattdonnelly == b27a89
let swifter = Swifter(
consumerKey: "FILL",
consumerSecret: "ME",
oauthToken: "IN",
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html"
@jessesquires
jessesquires / FCPrivateBatteryStatus.m
Created March 18, 2016 16:18
How to get raw battery info (mAh remaining, etc.) from iOS using private APIs. For internal testing only, NOT APP STORE DISTRIBUTION!
#import <Foundation/Foundation.h>
#include <dlfcn.h>
NSDictionary *FCPrivateBatteryStatus()
{
static mach_port_t *s_kIOMasterPortDefault;
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options);
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT);
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name);
import Cocoa
import MASShortcut
func pow() {
let rect = NSScreen.mainScreen()?.frame
let window = NSWindow(contentRect: rect!, styleMask: NSBorderlessWindowMask, backing: .Buffered, `defer`: false)
window.backgroundColor = NSColor.clearColor()
window.opaque = false
window.alphaValue = 1
window.makeKeyAndOrderFront(NSApplication.sharedApplication())
@jessesquires
jessesquires / update_xcode_plugins.sh
Last active April 4, 2016 20:35 — forked from neonichu/update_xcode_plugins
Update DVTPlugInCompatibilityUUIDs for installed plugins
#!/bin/sh
# ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2
# ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3
# ID='AABB7188-E14E-4433-AD3B-5CD791EAD9A3' # Xcode 7b5
# ID='7265231C-39B4-402C-89E1-16167C4CC990' #Xcode 7.1.1
ID='F41BD31E-2683-44B8-AE7F-5F09E919790E' # Xcode 7.2
PLIST_BUDDY=/usr/libexec/PlistBuddy