Skip to content

Instantly share code, notes, and snippets.

@bkeating
bkeating / howto-filemerge-git-osx.md
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

// DySlim is complicated and requires writing 6GB to disk (if only temporarily).
// This lets you mount the dyld shared cache via FUSE; the resulting files are weird but readable by things like otool and strings.
//
// gcc -std=gnu99 -I/opt/local/include -L/opt/local/lib -D_FILE_OFFSET_BITS=64 -o dsc dsc.c -lfuse -framework CoreFoundation
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
@tylerneylon
tylerneylon / learn.lua
Last active July 11, 2024 15:28
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active April 5, 2024 07:10
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 19, 2024 23:17
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@freedomtan
freedomtan / thermal-sensors.md
Last active April 3, 2021 09:21
Thermal Sensors in iOS Devices

get thermal sensors information on iOS devices

Sensors

As far as I can tell, there are two kinds of thermal sensors: "real" and synthetic ones. To get thermal sensor information, on iPhone 6s, we'll get something similar to the following

  iPhone:~ root# cycript  -p UserEventAgent
  
  cy# hs = [HidSensors sharedInstance]
  #"<HidSensors: 0x14de04210>"
@mar-v-in
mar-v-in / decrypt.java
Last active August 16, 2021 14:48
droidguasso.enc decrypter (including key material)
// Compile: javac decrypt.java
// Usage: java decrypt path-to/assets/droidguard/droidguasso.enc droidguasso.jar
import java.io.InputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.security.spec.AlgorithmParameterSpec;
import java.security.Key;
import javax.crypto.spec.IvParameterSpec;
@JohnCoates
JohnCoates / AutoHook.h
Created May 26, 2017 22:06
Simple Objective-C Method Hooking
@protocol AutoHook <NSObject>
@required
+ (NSArray <NSString *> *)targetClasses;
@end
@Bayonetta
Bayonetta / gist:bf699390e49bbc5f64262eb9aab61254
Created August 30, 2017 06:39
line_history_version.xml
<plist version="1.0">
<dict>
<key>pings</key>
<array />
<key>jingleDocType</key>
<string>purchaseSuccess</string>
<key>jingleAction</key>
<string>purchaseProduct</string>
<key>status</key>
<integer>0</integer>