This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var performance = (function () { | |
var my = {}; | |
// Wrap a function body in this to return a copy that instruments itself | |
// If you want this to be useful, you should give your profiled function a name, | |
// otherwise it will be identified as "", which is less than useful. | |
my.profile = function (func) { | |
return function () { | |
var start = new Date().getTime(), | |
time, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.g-imageReplace{ | |
border:0; | |
font: 0/0 a; | |
text-shadow:none; | |
color:transparent; | |
background-color:transparent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* tested on PhantomJS 1.6 */ | |
var page = require('webpage').create(), loadInProgress = false, fs = require('fs'); | |
var htmlFiles = new Array(); | |
// console.log(fs.workingDirectory); | |
// console.log(phantom.args[0]); | |
var curdir = phantom.args[0] || fs.workingDirectory; | |
var curdirList = fs.list(curdir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This work is licensed under the Creative Commons Attribution 3.0 Unported License. | |
* | |
* To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ | |
* or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. | |
*/ | |
/* | |
* Define your version here | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.zuhlke.lsapi; | |
import org.bouncycastle.crypto.PBEParametersGenerator; | |
import org.bouncycastle.crypto.digests.SHA3Digest; | |
import org.bouncycastle.crypto.generators.PKCS5S2ParametersGenerator; | |
import org.bouncycastle.crypto.params.KeyParameter; | |
import org.bouncycastle.crypto.prng.DigestRandomGenerator; | |
import java.util.Base64; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Get your files that Gmail block. Warning message: | |
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled." | |
# Based on: http://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/ | |
# Go to your emails, click the arrow button in the top right, "Show original", then "Download Original". Move the file to the same directory as this script. | |
import email | |
import sys | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perform a fresh install of Ubuntu 17.10 | |
# upgrade the kernel to v4.13.10 | |
mkdir ~/kernel-v4.13.10 | |
cd ~/kernel-v4.13.10 | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
sudo dpkg -i *.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2011-2015 The original author or authors | |
* ------------------------------------------------------ | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* and Apache License v2.0 which accompanies this distribution. | |
* | |
* The Eclipse Public License is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* |
OlderNewer