Skip to content

Instantly share code, notes, and snippets.

View johnantoni's full-sized avatar

John Griffiths johnantoni

  • Toronto, Ontario
View GitHub Profile
@johnantoni
johnantoni / gist:07df65898456ace4307d5bb6cbdc7f51
Last active January 15, 2026 14:48 — forked from mgmilcher/gist:5eaed7714d031a12ed97
Nginx, PHP-FPM, MySQL and phpMyAdmin on OS X

This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.

This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)

Xcode

Make sure you have the latest version of XCode installed. Available from the Mac App Store.

Install the Xcode Command Line Tools:

xcode-select --install

@johnantoni
johnantoni / jailbreak-7.1.2.md
Last active December 9, 2025 20:05
pangu jailbreak ios 7.1.2

confirmed working on ios 7.1.2 & iphone 5c with pangu osx app 1.1.0

  1. reset iphone (settings/general/reset/erase all content and settings)
  2. re-activate phone with itunes etc.
  3. download app from http://pangu.io/
  4. with iphone plugged into computer run pangu osx app (wifi & airplane mode does not need to be on)
  5. change phone's date to june 2 2014 as instructed by pangu app
  6. pangu app will inject pangu ios app onto iphone
  7. when instructed, open pangu app on iphone
  8. phone will then reboot
@johnantoni
johnantoni / instructions.md
Last active August 9, 2025 20:20 — forked from zentralwerkstatt/instructions.md
Install Syncthing on Raspberry Pi
  • Install the necessary packages:
sudo apt-get install apt-transport-https ca-certificates
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb http://apt.syncthing.net/ syncthing release" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing
sudo apt-get install git
  • Start syncthing once:
@johnantoni
johnantoni / install.md
Last active July 29, 2025 11:38
install duplicity on centos 64bit

check os

cat /etc/redhat-release

install repo

sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
yum repolist

install duplicity

@johnantoni
johnantoni / mysql.txt
Created August 7, 2012 18:57
mysql + vagrant + remote access
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
@johnantoni
johnantoni / startup_mailer.py
Created December 31, 2013 16:21
raspberry pi - send email on startup (will need gmail account to send from)
import subprocess
import smtplib
import socket
from email.mime.text import MIMEText
import datetime
# Change to your own account information
to = 'me@example.com'
gmail_user = 'test@gmail.com'
gmail_password = 'yourpassword'
smtpserver = smtplib.SMTP('smtp.gmail.com', 587)
@johnantoni
johnantoni / tinyMCE fix for jquery validation
Created December 20, 2010 17:54
tinyMCE fix for use with jQuery.validation plugin and IE
// when using the jquery.validation plugin with a tinymce textarea you will need to write the contents of the tinymce area back into the original textarea for jquery.validation to pick up it's new value
// force tinymce content to be written back into original textarea element
var content = tinyMCE.activeEditor.getContent();
$("textarea.tinymce").val(content);
// if all else fails
tinyMCE.triggerSave();
after this you can safely apply jquery validation ala...
@johnantoni
johnantoni / zsh prompt with rbenv
Created August 20, 2012 03:05
zsh prompt + rbenv
# Prompt
# local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"
# PROMPT='
# %~
# ${smiley} %{$reset_color%}'
# RBENV
# RPROMPT='%{$fg[white]%} $(rbenv version-name)$(~/.dotfiles/bin/git-cwd-info.rb)%{$reset_color%}'
@johnantoni
johnantoni / raspberry-pi.printer.md
Created January 12, 2014 19:53
raspberry pi printer server with cups
sudo apt-get -y install cups

sudo usermod -a -G lpadmin pi

sudo nano /etc/cups/cupsd.conf

comment out: Listen localhost:631

and replace with: Port 631

@johnantoni
johnantoni / mongoid.group.txt
Created October 23, 2012 15:08
mongoid group by
products.collection.group(:key => 'family', :initial => {count: 0}, :reduce => "function(doc,prev) { prev.count += +1; }")
products.collection.group(:keyf => 'function(doc) { return {family: doc.family};}', :initial => {count: 0}, :reduce => "function(doc,prev) { prev.count += +1; }", :finalize => 'function(doc) { doc; }')