Skip to content

Instantly share code, notes, and snippets.

Marcus Bointon Synchro

Block or report user

Report or block Synchro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Synchro / sfprefix.php
Created Jan 19, 2017
Salesforce prefix to entity name mapping
View sfprefix.php
* Mapping array for salesforce ID prefixes to entity name & description.
* @link
* Convert copy/paste from that page with:
* Search: '^([a-zA-Z0-9]+)[ \t]+(\w+)[ \t]*(.*)$'
* Replace: ' '$1' => ['$2', '$3'],'
* @author Marcus Bointon <>
Synchro /
Last active Jun 18, 2017 — forked from vitorbritto/
Install Apache with Homebrew

Install Apache with Homebrew

Installing Apache

# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2> /dev/null

# Install Apache 2.4 with the event MPM and HTTP/2 support
brew install -v homebrew/apache/httpd24 --with-mpm-event --with-http2
Synchro / # hhvm - 2016-09-20_08-39-45.txt
Created Sep 20, 2016
hhvm (hhvm/hhvm/hhvm) on macOS 10.11.6 - Homebrew build logs
View # hhvm - 2016-09-20_08-39-45.txt
Homebrew build logs for hhvm/hhvm/hhvm on macOS 10.11.6
Build date: 2016-09-20 08:39:45
Synchro /
Last active Sep 12, 2016 — forked from aeris/
Generate HPKP or TLSA fingerprint
# Uses pkey instead of rsa so it also works with ecc certs
case "$1" in
case "$2" in
openssl pkey -in "$3" -outform der -pubout 2>/dev/null | openssl dgst -sha256 -binary | openssl enc -base64
openssl req -in "$3" -pubkey -noout | openssl pkey -pubin -outform der 2>/dev/null | openssl dgst -sha256 -binary | openssl enc -base64
Synchro / ssl
Last active Aug 10, 2016 cipher issue
View ssl

Chrome 54 cipher list (from

TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca9)   Forward Secrecy	256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca8)   Forward Secrecy	256
OLD_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xcc14)   Forward Secrecy	256
OLD_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcc13)   Forward Secrecy	256
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)   Forward Secrecy	128
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)   Forward Secrecy	128
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (0xc02c)   Forward Secrecy	256
View UK #Leave

I'm just putting this here for entertainment value. It doesn't reflect my views.

  • We demand the unification of all British people in Great Britain on the basis of the people's right to self-determination.
  • We demand equality of rights for the British people in respect to the other nations; abrogation of the treaty of Lisbon.
  • We demand land and territory (colonies) for the sustenance of our people, and colonization for our surplus population.
  • A British citizen can only be one who is of British blood, without consideration of creed.
  • Whoever has no citizenship is to be able to live in Britain only as a guest, and must be under the authority of legislation for foreigners.
  • The right to determine matters concerning administration and law belongs only to the citizen. Therefore we demand that every public office, of any sort whatsoever, whether in the government, the county or municipality, be filled only by citizens. We combat the corrupting parliamentary economy, office-holding only according to party in
Synchro / openssl_pkcs7_sign_bug.php
Last active Aug 29, 2015
Demonstrate incorrect handling of $extracerts default value in openssl_pkcs7_sign PHP function
View openssl_pkcs7_sign_bug.php
$dn = array(
'countryName' => 'UK',
'stateOrProvinceName' => 'Here',
'localityName' => 'There',
'organizationName' => 'PHP',
'organizationalUnitName' => 'PHPTest',
'commonName' => 'PHP Test',
'emailAddress' => ''
Synchro / gist:dbbe7e80d8dce293c097
Created Oct 21, 2014
Dtruss trace of php 5.6 running slowly on OS X
View gist:dbbe7e80d8dce293c097
sudo dtruss -e -c -f php -v
30865/0x8a875: 304 thread_selfid(0x0, 0x0, 0x0) = 567413 0
30865/0x8a875: 6 csops(0x0, 0x0, 0x7FFF5B3161C8) = 0 0
30865/0x8a875: 4 issetugid(0x0, 0x0, 0x7FFF5B3161C8) = 0 0
30865/0x8a875: 7 shared_region_check_np(0x7FFF5B314108, 0x0, 0x7FFF5B3161C8) = 0 0
30865/0x8a875: 42 stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF5B315298, 0x7FFF5B3161C8) = 0 0
30865/0x8a875: 41 open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0) = 3 0
30865/0x8a875: 24 pread(0x3, "\312\376\272\276\0", 0x1000, 0x0) = 4096 0
30865/0x8a875: 8 pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x1000) = 4096 0
Synchro / chuid
Created Oct 9, 2014
Shell script to change a numeric UID and all files it owns
View chuid
# Change a user's UID and all files owned by them everywhere
# Syntax: chuid <from uid> <to uid>
# Example: chuid 1000 1001
# <From uid> must exist; <to uid> must not exist
# usermod will fail if the <from uid> has any running processes
# - stopping them is left to you
# @author Marcus Bointon <>
set -e
set -e
tar -zxf mysql-5.1.73.tar.gz
cd mysql-5.1.73
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
sudo make install
You can’t perform that action at this time.