Skip to content

Instantly share code, notes, and snippets.

@dopiaza
dopiaza / GlitchCalender.php
Created Dec 7, 2014
PHP class to get the the current game date for the much-missed game Glitch
View GlitchCalender.php
<?php
namespace Lumen\Glitch\CalendarBundle\Service;
class GlitchCalendar
{
private $timezone;
private $epoch;
private $daysInYear;
View keybase.md

Keybase proof

I hereby claim:

  • I am dopiaza on github.
  • I am dopiaza (https://keybase.io/dopiaza) on keybase.
  • I have a public key ASAgaiFxJztGO5KFzEqXp-kxz5Gi4pjhhLPPyxr47RGMlAo

To claim this, I am signing this object:

@dopiaza
dopiaza / convert-fla-to-png.jsfl
Created Nov 23, 2013
Batch convert .fla to .png, rescaling as we go
View convert-fla-to-png.jsfl
// Based on Dan Catt's https://github.com/revdancatt/CAT422-glitch-location-viewer/blob/master/tools/convert-fla-to-png.jsfl
// Updated by David Wilkinson (@dopiaza):
// - scale fla before exporting as png
// - close file if exception thrown
// Open a folder of fla files, and then output them in a parallel
// folder called "output"
//
// This is very rough and ready and needs babysitting for the files
// that don't work.
@dopiaza
dopiaza / post-update-slack
Created Sep 5, 2013
Git post-update commit hook to post a message to a Slack channel. Uses https://gist.github.com/dopiaza/6449505
View post-update-slack
#!/bin/bash
# This script is designed to be called from a git post-update hook
# Typical usage
# In your post-update hook, the first parameter is the branch ref. So in post-update, you would
# invoke this script something like this:
# /usr/local/bin/post-update-slack $1 <branch to match> <token> <channel>
# The script will only post to slack if the branch being updated matches the one listed as <branch to match>
# Use "any" to match any branch (hopefully you don't have a branch called "any")
@dopiaza
dopiaza / slackpost
Created Sep 5, 2013
Post a message to a Slack channel
View slackpost
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1