Skip to content

Instantly share code, notes, and snippets.

Jamie York ziadoz

Block or report user

Report or block ziadoz

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
ziadoz / gmap.php
Created Mar 19, 2014
Generating a Static Google Map with PHP
View gmap.php
$url = '';
$bits = array(
'center' => 'Calgary Tower, Calgary, AB, Canada',
'zoom' => '16',
'size' => '800x600',
'maptype' => 'roadmap',
'markers' => 'color:0x576d4e|label:N|49.6967179,-112.8450119',
'sensor' => 'false',
ziadoz /
Last active Oct 29, 2019
Fix OSX battery draining on sleep due to wifi activity

Fix OSX battery draining on sleep due to wifi activity

Install SleepWatcher using Homebrew:

sudo chown -R $(whoami) /usr/local
brew update
brew install sleepwatcher

Start the SleepWatcher service:

ziadoz /
Created Jul 22, 2017
Using XDebug in Atom Editor

Using XDebug in Atom Editor

Install the XDebug plugin for Atom and then add the following to the config.cson file (Atom > Config…):

  PathMaps: [
  ServerPort: 9001
ziadoz / screenshot.js
Last active Oct 20, 2019
CasperJS Website Screenshots
View screenshot.js
// Usage: casperjs screenshot.js bbc.png
var casper = require('casper').create({
viewportSize: { width: 1024, height: 768 }
var utils = require('utils');
if (casper.cli.args.length < 2) {
ziadoz /
Last active Oct 10, 2019
MKV to MP4 (Docker, FFMpeg, AVConv)
#!/usr/bin/env bash
# Convert MKV to MP4
# Uses Docker FFMpeg, FFMpeg or AVConv.
# Usage:
# ./
# ./ /path/to/videos
# Notes:
ziadoz /
Created Aug 30, 2019
Cloning Github Gists

Cloning Github Gists

To clone a gist:

git clone[GIST ID].git

If you need to add a remote to an existing repository:

git remote add origin[GIST ID].git
ziadoz /
Last active Sep 18, 2019
Download Websites with WGet
# WGet Manual:
# Link Checker:
# Archiving URLs:
# Download Webpage:
# Output Directory:
# WARC Files:
# Add -r or --recursive to get the whole website.
wget -T 10 -e robots=off -E -H -k -K -p -nH -nd -P /path/to/dir [URL]
wget --timeout 10 --execute robots=off --adjust-extension --span-hosts --convert-links --backup-converted --page-requisites --random-wait --no-host-directories --no-directories --directory-prefix --mirror --html-extension /path/to/dir [URL]
ziadoz / main.go
Last active Sep 1, 2019
Download a webpage as HTML with base64 encoded assets using Golang
View main.go
// Usage: go run main.go
// Based on Monolith:
package main
import (
ziadoz / repl.php
Last active Aug 29, 2019
View repl.php
#!/usr/bin/env php
if (php_sapi_name() !== 'cli') {
function input() {
return fgets(STDIN);
ziadoz /
Last active Aug 24, 2019
OS X Photos - View Raw Photos in Finder
#!/usr/bin/env bash
# Make the OS X Photos Library viewable as a folder called Raw in ~/Pictures
cd ~/Pictures
mkdir Raw
ln -s ~/Pictures/Photos\ Library.photoslibrary/Masters/ Raw
You can’t perform that action at this time.