Skip to content

Instantly share code, notes, and snippets.

Avatar
💣
'); DROP TABLE statuses; --

Ian Littman iansltx

💣
'); DROP TABLE statuses; --
View GitHub Profile
@iansltx
iansltx / downloader.php
Created Apr 1, 2018
Quick S3 bulk downloader
View downloader.php
<?php // requires aws/aws-php-dsk
// reads s3://bucket/key.ext lines from STDIN, saves them to ../files
require __DIR__ . '/vendor/autoload.php';
ini_set("memory_limit", "2G"); // impacted by concurrency + file sizes, since we aren't streaming
$s3 = new Aws\S3\S3Client(['credentials' => [
'key' => 'KEY_HERE', 'secret' => 'SECRET_HERE'
@iansltx
iansltx / jtt.php
Last active Apr 29, 2021
Quick CLI for adding work log times in JIRA
View jtt.php
#!/usr/bin/env php
<?php
if ($argc < 3) {
die("Usage: ./jtt.php ISSUE-1 30m optional comment here\n");
}
$username = 'EMAIL_GOES_HERE';
$token = 'API_KEY_HERE'; // see https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/
$team = 'TEAM_NAME_HERE';
View keybase.md

Keybase proof

I hereby claim:

  • I am iansltx on github.
  • I am iansltx (https://keybase.io/iansltx) on keybase.
  • I have a public key whose fingerprint is E573 8C97 94FB 9EB7 5BBB D66B A837 4166 D3C2 1523

To claim this, I am signing this object:

@iansltx
iansltx / README.md
Last active Nov 15, 2017
Build a Bot - php[world] 2017
View README.md
@iansltx
iansltx / README.md
Last active Sep 7, 2017
Build a Bot - PNWPHP 2017
View README.md
@iansltx
iansltx / asns201704152300.json
Last active Apr 16, 2017
Mastodon Instance ASN Lookup
View asns201704152300.json
{
"mastodon.social": {
"asn": "12876",
"desc": "AS12876, FR"
},
"mastodon.xyz": {
"asn": "16276",
"desc": "OVH, FR"
},
"awoo.space": {
View GDP per state
If each state got one electoral college vote per 50B in GDP, rounded to the nearest 50B
CA - 48
TX - 33
NY - 29
FL - 18
IL - 15
PA - 14
OH - 12
NJ - 12
@iansltx
iansltx / ting.php
Last active Sep 23, 2016
Ting CSV parser
View ting.php
<?php
if ($argc < 4) {
die("Usage: php ting.php minutesXXX.csv messagesXXX.csv megabytesXXX.csv\n");
}
$people = [];
$voice = fopen($argv[1], 'r');
$sms = fopen($argv[2], 'r');
View chromium-os-docker.md

Chromium OS ft. Docker

Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the HP Chromebook 13 G1 (aka HP Spyder Chromebook), but I can't think of any reason it wouldn't work with other devices. The Chromebook Pixel 2 (2015), for example...as you'll notice, the guide this was forked from assumed that machine.

  1. Create a build environment
  2. Customize the kernel
  3. Build Chromium OS
  4. Flash Chromium OS to USB
  5. Install Chromium OS
@iansltx
iansltx / gen.php
Last active Jul 14, 2016
Generator Scratchpad
View gen.php
<?php
function gen($arg1) {
var_dump($b = yield $arg1 + 1);
var_dump($d = yield $b + 2);
$ret = $d + 2;
var_dump($ret);
return $ret;
}