Skip to content

Instantly share code, notes, and snippets.

View mtibben's full-sized avatar

Michael Tibben mtibben

View GitHub Profile
@mtibben
mtibben / gist:4949919
Created February 14, 2013 01:20
Hook to tell you when to run a composer install. Put this in your .git/hooks/post-checkout
#!/usr/bin/env bash
file="composer.lock"
if [[ $(git diff HEAD@{1}..HEAD@{0} -- "${file}" | wc -l) -gt 0 ]]; then
echo
echo -e "======> \033[33m${file}\033[0m has changed! Execute \033[32mcomposer install --dev\033[0m"
echo
fi
@mtibben
mtibben / dev_job_ad.md
Last active December 16, 2015 00:59 — forked from lox/dev_job_ad.md

Wanted: Talented Web Application Developers with a keen interest in product development and a solid background in PHP, Ruby, Python or Go.

For this position, you'll need:

  • 3+ years industry experience
  • lots of experience with object-oriented techniques
  • experience with git, or equivelent dvcs
  • passion for writing code the right way

Working for 99designs, you'll get

@mtibben
mtibben / gist:7078931
Last active August 22, 2017 15:19
sublime-phpcs cheatsheet

sublime-phpcs cheatsheet

Install dependencies

brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php53 php-cs-fixer php-md php-code-sniffer
php-cs-fixer self-update

Translation tool

Problems with phreepio

  • Syncing with Smartling needs two commands - phreepio upload and phreepio download - which means the tool needs to do some operations twice. Leads to longer than necessary CI build times, could be more effiencent
  • Uploading overwrites files. This is problematic for a tool that needs to be shared between users and branches. Also problematic because Smartling now deletes untranslated strings if a file is overwritten, even if the string has been approved.
  • caching implementation has edge cases
  • dependency on php makes it hard to use in other projects

Feature wishlist

Keybase proof

I hereby claim:

  • I am mtibben on github.
  • I am tibbo (https://keybase.io/tibbo) on keybase.
  • I have a public key ASC4j6CjcUy7foS0zPVP78IQ8zsa7_wmvGCRCDJR7_XhtAo

To claim this, I am signing this object:

@mtibben
mtibben / todo.bash
Last active February 1, 2017 04:40
My super lightweight todo (based on a GTD-ish workflow)
# add to your ~/.bash_profile
export TODO_EDITOR=subl
export TODO_FILE=~/Dropbox/todo.md
alias init_todo="printf '## Next actions:\n\n## Scheduled:\n\n## Waiting on:\n\n## Projects:\n\n## Tickler:\n\n## Archive:\n\n' >> $TODO_FILE"
alias todo='$TODO_EDITOR $TODO_FILE'
alias next='sed -e '"'"'/^$/,$d'"'"' $TODO_FILE'
next
My traceroute [v0.87]
Tibbo.local (0.0.0.0) Mon Feb 6 11:31:00 2017
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. my.meraki.net 0.0% 264 3.1 4.8 1.5 129.4 8.3
220.101.87.161
2. 220.101.87.161 99.6% 264 3.1 3.1 3.1 3.1 0.0
3. ???
4. ???
@mtibben
mtibben / 2017-07-03T02_04_20_906Z-debug.log
Last active July 3, 2017 02:21
NPM with docker NFS volume testcase
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli 'mkdirp' ]
2 info using npm@5.0.3
3 info using node@v8.1.2
4 verbose npm-session c1a2de0a777de9e3
5 silly install loadCurrentTree
git remote prune origin
git branch -r --merged origin/master \
| grep -v '>' \
| grep -v master \
| sed -E "s|^ *origin/||g"
@mtibben
mtibben / bug-report.md
Last active April 30, 2018 20:52
Apple bug report 35065812: macOS High Sierra curl does not use certs in the keychain

In High Sierra, curl has switched from linking against SecureTransport, to use LibreSSL. However with this change, it seems that curl no longer recognises trusted certificates stored in the keychain.

# note that safari does not trust the site (expected)
$ open -a Safari https://self-signed.badssl.com/

# note that curl does not trust the site (expected)
$ curl https://self-signed.badssl.com
curl: (60) SSL certificate problem: self signed certificate

# trust the self-signed certificate by adding it to the keychain