Skip to content

Instantly share code, notes, and snippets.

View iansltx's full-sized avatar
💣
'); DROP TABLE statuses; --

Ian Littman iansltx

💣
'); DROP TABLE statuses; --
View GitHub Profile
@iansltx
iansltx / distributions.js
Created July 28, 2018 14:38
AndreasMadsen/distributions browserified
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.distributions = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
exports.Normal = require('./distributions/normal.js');
exports.Studentt = require('./distributions/studentt.js');
exports.Uniform = require('./distribut
@iansltx
iansltx / downloader.php
Created April 1, 2018 03:06
Quick S3 bulk downloader
<?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 April 29, 2021 06:07
Quick CLI for adding work log times in JIRA
#!/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';
@iansltx
iansltx / keybase.md
Created October 13, 2017 00:43
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 November 15, 2017 14:57
Build a Bot - php[world] 2017
@iansltx
iansltx / README.md
Last active September 7, 2017 16:39
Build a Bot - PNWPHP 2017
@iansltx
iansltx / asns201704152300.json
Last active April 16, 2017 04:30
Mastodon Instance ASN Lookup
{
"mastodon.social": {
"asn": "12876",
"desc": "AS12876, FR"
},
"mastodon.xyz": {
"asn": "16276",
"desc": "OVH, FR"
},
"awoo.space": {
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 September 23, 2016 03:33
Ting CSV parser
<?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');

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