Skip to content

Instantly share code, notes, and snippets.

View lethosor's full-sized avatar

Alan lethosor

View GitHub Profile
@jtriley
jtriley / terminalsize.py
Created July 26, 2011 21:58
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
@stemid
stemid / colout_df.py
Last active December 18, 2015 05:39
Dwarf Fortress gamelog Colout theme for Solarized terminals.
# Colout Dwarf Fortress theme for Solarized terminals
# First install colout, go to https://github.com/nojhan/colout
#
# mkdir ~/.colout
# cp colout_df.py ~/.colout/
# tail -0f df/gamelog.txt | colout -T ~/.colout -t df
#
# I just started this for my own sake, please do add your own colors, regexes and stuff.
# By Stefan Midjich
@warmist
warmist / SpawnUnitR3.lua
Last active December 22, 2015 22:49
A variation of spawnunit for r3 with little bug fixes. Ported by Putnam Fix for death age?
--create unit at pointer or given location. Usage e.g. "spawnunit DWARF 0 Dwarfy"
--Made by warmist, but edited by Putnam for the dragon ball mod to be used in reactions
--note that it's extensible to any autosyndrome reaction to spawn anything due to this; to use in autosyndrome, you want \COMMAND spawnunit CREATURE caste_number name \LOCATION
args={...}
function getCaste(race_id,caste_id)
local cr=df.creature_raw.find(race_id)
return cr.caste[caste_id]
@joegoggins
joegoggins / install and add gcc arm to PATH.sh
Last active December 12, 2022 06:59
How I installed GCC ARM on my Mac 10.9 Mac Book Pro
# Download the file manually from here https://launchpad.net/gcc-arm-embedded
# Note: `curl` command doesn't work
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2"
# double click it to unzip it
# Make a place to install it to
mkdir /usr/local/gcc_arm
# Move the unzipped stuff there.
@Putnam3145
Putnam3145 / hackWish.lua
Last active June 17, 2021 11:02
Allows for wishy-type reaction to get any item made of any material. Syntax is "hackWish" followed by x,y,z or a unit. If highlighting a tile, it will place the item there. If highlighting a unit, including with "v", it will put it at the feet of the unit.
-- Allows for script-based wishing.
function getGenderString(gender)
local genderStr
if gender==0 then
genderStr=string.char(12)
elseif gender==1 then
genderStr=string.char(11)
else
return ""
@locriani
locriani / .bash_profile
Last active March 9, 2017 22:24
SSH Terminal Color Hack
alias ssh="~/.bash/ssh.sh"
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 19, 2024 16:50 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy