Skip to content

Instantly share code, notes, and snippets.

View apparition47's full-sized avatar
📱
(╯°□°)╯︵ ┻━┻

Aaron Lee apparition47

📱
(╯°□°)╯︵ ┻━┻
View GitHub Profile
import lldb
def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('command script add -f SwiftPrinter.printer pjson')
def printer(debugger, command, result, internal_dict):
debugger.HandleCommand('p print(String(data: try! JSONSerialization.data(withJSONObject:' + command + ', options: .prettyPrinted), encoding: .utf8 )!)')
extension Result {
public func `catch`(_ handler: () throws -> Success) -> Result<Success, Error> {
flatMapError { _ in
.init { try handler() }
}
}
public func `catch`(_ handler: (Failure) throws -> Success) -> Result<Success, Error> {
flatMapError { error in
.init { try handler(error) }
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@manmal
manmal / print_advertisingid_usage.sh
Created September 14, 2020 08:51
Find IDFA usage in 3rd party frameworks
for framework in Frameworks/*.framework; do
fname=$(basename $framework .framework)
echo $fname
otool -v -s __TEXT __objc_methname $framework/$fname | grep advertisingIdentifier
done
@dhh
dhh / tracker_blocking.rb
Last active July 27, 2023 14:19
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",
@johnwgillis
johnwgillis / How to setup GPG for git.md
Last active April 22, 2024 17:13
How to setup GPG for signing commits with Git, SourceTree, and GitHub on Mac

How to setup GPG for signing commits with Git, SourceTree, and GitHub on Mac

  1. Install GPG tools
    1. Install GPG tools and setup pin entry by running:
    brew install gnupg pinentry-mac
    mkdir -m 700 -p ~/.gnupg
    echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
    killall gpg-agent
    
@crsantos
crsantos / ServiceLocator.swift
Last active May 26, 2020 14:52 — forked from FGoessler/ServiceLocator.swift
A very lightweight ServiceLocator implementation including a module mechanism written in Swift.
import Foundation
public typealias ServiceFactoryClosure<Service> = () -> Service
public protocol ServiceLocatorModule {
func registerServices(_ serviceLocator: ServiceLocator)
}
public class ServiceLocator {
@CyberPunkCodes
CyberPunkCodes / killadobe.sh
Last active November 21, 2022 16:41
Mac Bash script to kill Adobe Create Cloud and other processes that Adobe forces on us.
#!/bin/bash
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n"
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
echo "\n\n--- Done! ---\n\n"
anonymous
anonymous / dev_jobs_in_japan.md
Created September 16, 2016 04:34
Software dev jobs in Japan

Companies

  • Github - Recently started hiring developers in Tokyo
  • Heroku - Infrastructure-as-a-service; recently bought by Salesforce
  • Pivotal Labs - Recently started hiring developers in Tokyo; nice Mori Tower office
  • Google - Consistently ranked best place in Japan to work; nice Mori Tower office
  • Amazon - I THINK they now hire some developers
  • Microsoft - English-friendly with chances to speak Japanese; apparently have some interesting projects; nice Shinagawa office
  • Kaizen Platform - Pretty awesome company developing A/B testint as a service / analytics services; I think most people there speak English; has an office in San Francisco
  • [Treasure Data](https://www.treasureda
@CanTheAlmighty
CanTheAlmighty / DisplayLink.swift
Last active March 10, 2024 08:43
DisplayLink for OSX