Skip to content

Instantly share code, notes, and snippets.

View squarefrog's full-sized avatar
😍
❤️ Swift

Paul Williamson squarefrog

😍
❤️ Swift
  • Cambridgeshire, UK
View GitHub Profile
@tsabat
tsabat / zsh.md
Last active July 7, 2024 16:56
Getting oh-my-zsh to work in Ubuntu
@g3d
g3d / gist:2709563
Last active February 7, 2024 15:21 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 22, 2024 12:48
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@sjwilliams
sjwilliams / gist:3903157
Created October 17, 2012 01:03 — forked from lucasfais/gist:1207002
Sublime Text 2 Cheat Sheet. Shortcuts, including Vintage mode.

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘KB toggle side bar
⌘⇧P command prompt
⌃ ` python console
⌘⇧N new window (useful for new project)
@stephenmckinney
stephenmckinney / .tmux.conf
Created December 3, 2012 20:47
Vim + Tmux + Mac OS X Clipboard (pbcopy) integration
# Mac OS X clipboard integration
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# Optional keybindings: Enter Copy-mode and Copy and Paste sorta like Vim.
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
@mattt
mattt / uiappearance-selector.md
Last active June 4, 2024 13:28
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
INSERT INTO 'snippets' ('title', 'body') VALUES
(':+1:', '👍'),
(':-1:', '👎'),
(':100:', '💯'),
(':1234:', '🔢'),
(':8ball:', '🎱'),
(':a:', '🅰'),
(':ab:', '🆎'),
(':abc:', '🔤'),
(':abcd:', '🔡'),
@clifferson
clifferson / gist:7345596
Last active December 27, 2015 15:09
Using shell to install chef to use ruby to configure your mac!

What?

Use chef-solo driven by soloist to apply recipes to a mac and configure it just how you like.

bit.ly/chef4mac < this presentation (meta)

What is chef-solo and soloist

  • chef-solo : Dont concern yourself with this much?
@alloy
alloy / STFU_UIAccessibilityLoader.m
Last active October 17, 2021 04:31
(If you too like to live dangerously) this will get rid of the following error message when running on the iOS Simulator: `Cannot find executable for CFBundle <CertUIFramework.axbundle>`
// When the `accessibility inspector' is enabled on the iOS Simulator the private `UIAccessibility'
// framework is loaded. In turn it will try to load a list of bundles amongst which is one that has
// only resources, no executable. This leads to `CFBundleLoadExecutableAndReturnError' logging this
// offending error message.
//
// This code omits the `SDK_ROOT/System/Library/AccessibilityBundles/CertUIFramework.axbundle'
// bundle from ever being attempted to load.
//
// This code is available under the MIT license: http://opensource.org/licenses/MIT
//
@tauzen
tauzen / hexstring.js
Last active July 31, 2023 00:06
Hex string to byte and other way round conversion functions.
function byteToHexString(uint8arr) {
if (!uint8arr) {
return '';
}
var hexStr = '';
for (var i = 0; i < uint8arr.length; i++) {
var hex = (uint8arr[i] & 0xff).toString(16);
hex = (hex.length === 1) ? '0' + hex : hex;
hexStr += hex;