Skip to content

Instantly share code, notes, and snippets.

View letter-table.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Chronial / reactor_idle_fix.user.js
Last active Apr 4, 2017
Rector Idle HeatExchange fixer UserScript
View reactor_idle_fix.user.js
// ==UserScript==
// @name Reactor Idle HeatExchange fixer
// @namespace
// @version 0.1
// @description Fix heat exchanger in reactor idle
// @author Chronial
// @match
// @grant none
// ==/UserScript==
Chronial / is_online.php
Created Apr 26, 2016
Steam API Wrapper for DSCM
View is_online.php
$ids = explode(',', $_GET['ids']);
$ids = array_filter($ids, 'is_numeric');
$data = ask_api($ids);
foreach ($data as $k => $v){
echo $k . ',' . ($v ? "True" : "False") . "\n";
Chronial /
Last active Jun 5, 2016
Whitenoise support for django compressor
from django.conf import settings
from whitenoise.django import DjangoWhiteNoise
class DjangoCompressWhiteNoise(DjangoWhiteNoise):
def __call__(self, environ, start_response):
# Handle files generated on the fly by django-compressor
url = environ['PATH_INFO']
if url.startswith(self.static_prefix) and url not in self.files:
if self.is_compressed_file(url):
Chronial / .tmux.conf
Created Jun 26, 2015
.tmux.conf for servers
View .tmux.conf
# use UTF8
set -g utf8
set-window-option -g utf8 on
# Set the default terminal mode to 256color mode.
set -g default-terminal "screen-256color"
# use fish shell
set-option -g default-shell "/usr/bin/fish"
Chronial / vimrc.local
Created Jun 26, 2015
Vimrc for servers
View vimrc.local
" Based on sensible.vim 1.1
if exists('g:loaded_sensible') || &compatible
let g:loaded_sensible = 1
if has('autocmd')
filetype plugin indent on
from itertools import product
alice = lambda x: x
bob = lambda x: not x
print(all(alice(a) == b or bob(b) == a
for a, b in product([True, False], repeat=2)))
#!/usr/bin/python -O
Finds the branch all the commits have most likely been mode on
import os
import sys
import re
from pprint import pprint
Chronial / unitdata.txt
Created May 1, 2012
Unit Data from Epic War saga
View unitdata.txt
pk_id 1
name_id kiddragon
name_str Puppy Dragon
desc Magic Unit
level_req 0
price_gold 500
price_crystal 0
pop 6