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
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 https://gist.github.com/Chronial/5981aff4706e6d59f1f5ff743cfe4350
// @version 0.1
// @description Fix heat exchanger in reactor idle
// @author Chronial
// @match http://reactoridle.com/
// @grant none
// ==/UserScript==
@Chronial
Chronial / is_online.php
Created Apr 26, 2016
Steam API Wrapper for DSCM
View is_online.php
<?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
Chronial / whitenoise_compressor.py
Last active Jun 5, 2016
Whitenoise support for django compressor
View whitenoise_compressor.py
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
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
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
finish
else
let g:loaded_sensible = 1
endif
if has('autocmd')
filetype plugin indent on
View coins.py
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)))
View git-annotate-log.py
#!/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
Chronial / unitdata.txt
Created May 1, 2012
Unit Data from Epic War saga
View unitdata.txt
DATA
fire_kiddragon
pk_id 1
name_id kiddragon
name_str Puppy Dragon
desc Magic Unit
level_req 0
price_gold 500
price_crystal 0
pop 6