Skip to content

Instantly share code, notes, and snippets.

View twisty's full-sized avatar

Tim Brayshaw twisty

  • Flax Bourton, Bristol, UK
View GitHub Profile

Keybase proof

I hereby claim:

  • I am twisty on github.
  • I am twisty (https://keybase.io/twisty) on keybase.
  • I have a public key ASD310NoOdzfI8kMD3OxWANr5BqL5rIFCF4DIgHfk6KqNAo

To claim this, I am signing this object:

@twisty
twisty / hterm_solarized.js
Last active September 25, 2017 19:22 — forked from russelldavies/hterm_solarized.js
Chrome/Chromium OS hterm and Secure Shell solarized color scheme.
// Run in the JavaScript console of the hterm browser window
// Clear all existing settings - you probably don't want to do this.
// Preferences are now stored in "chrome.storage.sync" instead of
// "window.localStorage" so if you clear your preferences the changes
// will be propagated to other devices.
//term_.prefs_.storage.clear();
var htermProfiles = [
@twisty
twisty / git-on-synology-nas.md
Last active October 4, 2019 23:45
Notes on setting up git on a Synology NAS

Setup NAS

Using the DSM web interface:

  1. Install git from the package at http://www.synocommunity.com/
  2. Create a 'git' user account.
  3. Allow terminal (ssh) access.

See this guide for more details on the next bit:

@twisty
twisty / nuke-pages-preferences.sh
Created March 23, 2013 16:37
Perform a deep reset of preferences for “Pages ’09”. This fixed an issue for me where Pages was unable to launch due to “an unexpected error”.
#/bin/sh
rm -rf ~/Library/Preferences/com.apple.iwork.pages.plist
rm -rf ~/Library/Caches/com.apple.iWork.Pages
rm -rf '~/Library/Autosave Information/com.apple.iWork.Pages.plist'
rm -rf '~/Library/Caches/com.apple.helpd/Generated/com.apple.iWork.Pages.help'
rm -rf '~/Library/Saved Application State/com.apple.iWork.Pages.savedState'
# If that doesn't work, also try…
#
@twisty
twisty / unambiguous-random-string.php
Last active December 14, 2015 05:48
Generate an unambiguous random string from a set of possible characters.
<?php
/**
* Generate an unambiguous random string from a set of possible characters.
*
* The range of possible characters is taken from [a-z] and [0-9] with
* some removed to remove ambiguity if read aloud.
*
* Removed as they’re visually similar:
*
@twisty
twisty / php-syntax-check.md
Last active April 4, 2021 16:55
Check for PHP syntax errors for multiple files in a set of folders using PHP's "lint" option.

Syntax check php files in folders:

find ./foo ./bar \( -name "*.php" -or -name "*.phtml" \) -print0 | xargs -0 -n 1 php -l