Skip to content

Instantly share code, notes, and snippets.

View jbrooksuk's full-sized avatar
🧑‍🚀

James Brooks jbrooksuk

🧑‍🚀
View GitHub Profile
@jbrooksuk
jbrooksuk / locker.php
Created June 20, 2016 10:15
AltThree/Locker Usage
<?php
namespace App\Bus\Middleware;
use AltThree\Locker\Locker;
use Closure;
use Illuminate\Contracts\Queue\ShouldQueue;
class LockingMiddleware
{
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
<?php
class XLS {
public function __construct($strFileName) {
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=$strFileName.xls");
import sublime, sublime_plugin, re
import time
import threading
from os.path import basename
sublime_version = 2
if not sublime.version() or int(sublime.version()) > 3000:
sublime_version = 3
def plugin_loaded():
{
"content_scripts": [ {
"js": [ "js/jquery-1.4.2.min.js", "js/script.js" ],
"css": [ "css/style.css" ],
"matches": [ "http://www.autoitscript.com/forum/*" ],
"run_at": "document_end"
} ],
"icons": { "48": "icon48.png" },
"name": "AutoIt Forum Minimizer",
"manifest_version": 2,
@jbrooksuk
jbrooksuk / script.js
Last active December 21, 2015 01:48
AutoIt Forum Minimizer - Tidied up
/* jshint devel:true */
/**
AutoIt Forum Minimizer v1.1.1 by FireFox
http://www.autoitscript.com/forum/user/42741-firefox/
**/
(function () {
"use strict";
var $j = jQuery.noConflict();
var aSettings = [
@jbrooksuk
jbrooksuk / plugin.js
Created June 28, 2013 10:20
Selectize Cache Plugin... beginning.
Selectize.registerPlugin('local_storage_cache', function(options) {
var self = this;
var Store = null;
options = $.extend({
lifeTime: -1, // Store forever
keyCacheTimeName: 'meta_ct_',
keyLifeTimeName: 'meta_lt_'
}, options);
@jbrooksuk
jbrooksuk / Preferences.sublime-settings
Created May 14, 2013 13:51
Sublime Text 3 Config
{
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow.tmTheme",
"drag_text": true,
"draw_minimap_border": true,
"enable_telemetry": true,
"font_face": "Envy Code R",
"font_size": 13,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
{
"color_scheme": "Packages/Base16 Color Schemes/base16-tomorrow.dark.tmTheme",
"drag_text": true,
"draw_minimap_border": true,
"enable_telemetry": true,
"font_face": "Envy Code R",
"font_size": 13,
"highlight_modified_tabs": true,
"highlight_line": true,
"ignored_packages":
var express = require('express'),
http = require('http'),
https = require('https'),
crypto = require('crypto'),
fs = require('fs'),
url = require('url'),
winston = require('winston');
var app = express();