Skip to content

Instantly share code, notes, and snippets.

View davidcraig's full-sized avatar

David Craig davidcraig

View GitHub Profile
@davidcraig
davidcraig / setup.php
Created March 31, 2017 09:03
PHP script to install packages globally on a linux/mac box
<?php
$composer_src = "https://getcomposer.org/composer.phar";
$phpdoc_src = "http://phpdoc.org/phpDocumentor.phar";
$phpunit_src = "https://phar.phpunit.de/phpunit.phar";
$yes_values = ['', 'y', 'Y', 'yes', 'Yes'];
$bin_path = "/usr/local/bin/";
function install_package($name, $package_url)
@davidcraig
davidcraig / script.js
Last active March 31, 2017 07:56
PhantomJS - Take a screenshot of a webpage as seen in the browser.
var website = 'http://www.google.co.uk';
var filename = './google.jpg';
var page = require('webpage').create();
page.viewportSize = {
width: 1024,
height: 592
};
page.open(website, function(status) {
@davidcraig
davidcraig / keybase.md
Created March 10, 2017 18:17
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: