Skip to content

Instantly share code, notes, and snippets.

View jmason's full-sized avatar

Justin Mason jmason

View GitHub Profile
mysql> select * from push_message_campaigns where game_id = 2511 and push_message_campaigns.name like 'Final Bug%'\G
*************************** 1. row ***************************
id: )x;LGe
slug: 0329783b-c54c-47c0-9007-65c3a10fb987
game_id: 2511
name: Final Bug Test
description: NULL
scheduled_time: NULL
global_schedule: 1
platform: gcm
mysql> select * from push_message_campaigns where game_id = 2511 and push_message_campaigns.name like 'Final Bug%'\G
*************************** 1. row ***************************
id: )x;LGe
slug: 0329783b-c54c-47c0-9007-65c3a10fb987
game_id: 2511
name: Final Bug Test
description: NULL
scheduled_time: NULL
global_schedule: 1
platform: gcm
@jmason
jmason / pcalc
Created June 25, 2015 16:03
pcalc
#!/usr/bin/perl
#
# pcalc -- simple perl calculator for desktop arithmetic.
use strict;
use bytes;
if (@ARGV > 0 && $ARGV[0] eq '--filter') {
shift;
while (<>) {
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.orc.CompressionCodec;
import org.apache.orc.OrcFile;
import org.apache.orc.OrcProto;
alias: Control Zappi charging based on solar PV
description: >-
Switch the Zappi EV charger on (in Eco mode), or off, depending on the
availabilty of power from the solar panels. If the charger is already on in
"Fast" mode, let that run without any interruption (drawing from the grid
or battery if required).
sequence:
- alias: Only run during the daytime
condition: time
after: "09:00:00"
@jmason
jmason / Ridding my home network of IP addresses.md
Last active February 28, 2025 16:18
Ridding my home network of IP addresses

Recent changes in the tech scene have made it clear that relying on commercial companies to provide services I rely on isn't a good strategy in the long term, and given that Tailscale is so effective these days as a remote-access system, I've gradually been expanding a small collection of self-hosted web apps and services running on my home network.

Until now they've mainly been addressed using their IP addresses and random high ports on the internal LAN, for example: