Skip to content

Instantly share code, notes, and snippets.

View wdmtech's full-sized avatar

Will Murray wdmtech

  • UK
View GitHub Profile
@wdmtech
wdmtech / .extra
Created March 26, 2015 21:32
.extra dotfiles/overrides for mathiasbynens/dotfiles
alias dev="cd ~/Dev"
alias dropbox="cd ~/Dropbox"
alias vag="cd ~/Vagrant"
# Vagrant
alias vu="vagrant up"
alias vr="vagrant reload"
alias vh="vagrant halt"
alias vd="vagrant destroy"
alias vs="vagrant status"
@wdmtech
wdmtech / Get URL parameters via jQuery
Last active August 29, 2015 14:21
Gets query string parameters in jQuery
// Gets query string parameters
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if(results && results.length > 0) {
return results[1] || 0;
}
};
// Example usage
if($.urlParam('screen_grab'))
@wdmtech
wdmtech / tools.php
Created May 29, 2015 09:10
A load of useful PHP functions that should really be factored into a package or something at some point.
<?php
/**
* Class FormatMe
*
* This is just my collection of helper functions, should probably put them in a package
* at some point due to their usefulness.
*
*/
@wdmtech
wdmtech / URLify.php
Created May 29, 2015 09:11
Converts strings to clean URLs
<?php
/**
* A PHP port of URLify.js from the Django project
* (https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js).
* Handles symbols from Latin languages, Greek, Turkish, Russian, Ukrainian,
* Czech, Polish, and Latvian. Symbols it cannot transliterate
* it will simply omit.
*
* Usage:
https://laracasts.com/forum/?p=1648-phpstorm-homestead-xdebug/
@wdmtech
wdmtech / web.config
Created October 7, 2015 09:33 — forked from allebb/web.config
Laravel 5.x web.config file for Windows Azure hosting
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/>
<staticContent>
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
</staticContent>
@wdmtech
wdmtech / Remove hiberfil.sys from Windows 7.md
Last active October 22, 2015 20:13
Remove hiberfil.sys from Windows 7
@wdmtech
wdmtech / ClearCaches.php
Created October 23, 2015 10:15
Quick 'n dirty Laravel 5 view (blade) cache, session file cache and debugbar cache delete command
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class ClearCaches extends Command
{
/**
@wdmtech
wdmtech / setup-modernie-vagrant-boxes.md
Created November 12, 2015 10:30 — forked from andrealbinop/setup-modernie-vagrant-boxes.md
Setup modern.ie vagrant boxes

Setup modern.ie vagrant boxes

Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.

However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.

Pre-requisites

@wdmtech
wdmtech / BASH Cheatsheet.md
Created November 17, 2015 10:45
BASH commands I'll eventually forget