Skip to content

Instantly share code, notes, and snippets.

View devjack's full-sized avatar

Jack Skinner devjack

View GitHub Profile
@devjack
devjack / weekly-block.css
Last active May 27, 2018 09:46 — forked from pento/weekly-block.css
The Weekly Block
/**
* License: GPL-3.0+
*/
.weekly-link {
/*border-left: 3px solid rgba(0,0,0,.8);*/
border-left: 3px solid rgba(255, 160, 0, 1);
padding-left: 2em;
padding-right: 2em;
margin-bottom: 2em;
}
title tags categories date
How to release during the holidays
software engineering
blog
2017-12-22

And so we reach the end of another coding-year and while many of us are plotting our holiday hacks and offline AR (actual reality) adventures there are a few folks who still have to launch features over the break.

@devjack
devjack / keybase.md
Created November 23, 2017 04:08
keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@devjack
devjack / list_of_languages.md
Last active January 9, 2016 04:17
Open source languages - codes of conduct
@devjack
devjack / index.txt
Created January 8, 2016 07:43
OneName Verification
Verifying that +developerjack is my blockchain ID. https://onename.com/developerjack
@devjack
devjack / gist:0a5bde675515b1d5a324
Created August 6, 2015 10:21
Sculpin --url bug?
git clone https://github.com/sculpin/sculpin-blog-skeleton.git
cd sculpin-blog-skeleton/
printf "\nurl: http://mysite.com/" >> app/config/sculpin_site.yml
sculpin generate --server --watch --url=http://127.0.0.1:8000
Note that the URL's still contain mysite.com instead of 127.0.0.1
@devjack
devjack / java_parser.php
Last active August 29, 2015 14:20
A crude lexer and parser for simple operations and expressions
<?php
/**
* This is a very crude file designed to trace the symbol table for simple operations and expressions. Syntax is based on Java
* - assignment operators
* - basic arithmetic
* - apply multiple operators in a single expression (x + y + z etc.)
*
* Not implemented:
* - complex structures (loops, conditions, arrays, classes, packages etc. etc. etc.)
* - does not support type checking, type hinting (ignored in lexer) or anything 'useful'
@devjack
devjack / s3-header-hack.sh
Last active August 29, 2015 14:19
Cache-Control headers for S3 Static sites
#!/bin/bash
### USAGE ###
## Sets $1's objects' Cache-control:max-age= header to $2.
## e.g. ./s3-header-hack.sh mybucket 60 // for 60 seconds.
s3Cmd() {
cmd=$1;
if type $cmd 2>/dev/null; then
S3CMD=$cmd;
<?php
function factorial($n) {
if($n==0) return 1;
$t=$n--;
while ($n > 0) {
$t*=($n--);
}
return $t;
}
<?php
function colours() {
for($i=0x0; $i<0xffffff; $i++) {
yield $i;
}
}
foreach(colours() as $elePHPant) {
echo sprintf("I want a #%06X elePHPant!".PHP_EOL, $elePHPant);
}