Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Halley tomhalley

  • United Kingdom
View GitHub Profile
@tomhalley
tomhalley / gist:4f6310465e2b055bdc33
Created Mar 30, 2015
jQuery Deferred Image Preloader
View gist:4f6310465e2b055bdc33
var images = [
"pins/bluePin.png",
"pins/greenPin.png",
"pins/orangePin.png",
"pins/pinkPin.png",
"pins/purplePin.png",
"pins/yellowPin.png"
];
var preloadImages = function() {
View gist:86c2eadd1253ba06a7a9
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.110.50"
config.vm.provision :shell, path: ".vagrant/scripts/main.sh"
config.vm.provision "shell", inline: "service apache2 restart"
config.vm.synced_folder "/var/www/", "/home/tom/Projects/easyproperty"
View gist:726abdc7425c51ced112
<VirtualHost *:80>
ServerName 192.168.110.50
DocumentRoot /var/www/public
<Directory /var/www/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
@tomhalley
tomhalley / gist:72b52d6ae73d9155a282
Last active Aug 29, 2015
jQuery Sequential Deferred
View gist:72b52d6ae73d9155a282
var persistUploads = function () {
var deferred = $.Deferred(),
persistQueue = [];
for (var type in Behaviour.Uploads.files) {
Behaviour.Uploads.files[type].sort(function(a,b) { return a.order - b.order; });
var image;
for (var a = 0; a < Behaviour.Uploads.files[type].length; a++) {
You can’t perform that action at this time.