Skip to content

Instantly share code, notes, and snippets.

View opensussex's full-sized avatar

Graham Holden opensussex

View GitHub Profile
@opensussex
opensussex / diff.rb
Created December 23, 2016 11:55
a very basic example of using the Diffy library to do a diff on two files.
require ('diffy')
#uses the Diffy library - https://github.com/samg/diffy
file_1, file_2 = ARGV;
file_1_text = open(file_1)
file_2_text = open(file_2)
puts Diffy::Diff.new(file_1_text.read, file_2_text.read)
<?php
use GuzzleHttp\Client;
class TextMarketer
{
private $username;
private $password;
private $orig;
@opensussex
opensussex / packages.txt
Created August 1, 2016 15:00
atom packages
atom-php-navigation
autocomplete-elixir
autocomplete-php
git-blame
git-diff-details
git-history
git-time-machine
language-elixir
linter
linter-phpcs
@opensussex
opensussex / Vagrant
Last active July 12, 2016 08:14
vagrant box.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
zend_extension=xdebug.so
xdebug.remote_enable=On
xdebug.remote_handler="dbgp"
xdebug.remote_port=9000
xdebug.remote_autostart = 1
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_connect_back=on
@opensussex
opensussex / private.xml
Last active February 19, 2016 12:45
private.xml for karabiner to swap backquote with backslash needed for wasd keyboard on a mac.
<?xml version="1.0"?>
<root>
<item>
<name>Swap backslash and backquote key.</name>
<identifier>private.backslash_to_backquote</identifier>
<autogen>__KeyToKey__ KeyCode::DANISH_DOLLAR, KeyCode::BACKQUOTE</autogen>
<autogen>__KeyToKey__ KeyCode::BACKQUOTE, KeyCode::DANISH_DOLLAR</autogen>
</item>
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {