Skip to content

Instantly share code, notes, and snippets.

@Fylwind
Fylwind / biblatexstyle.tex
Last active February 3, 2018 04:08
Tweak biblatex for astronomy
\documentclass[12pt]{article}
\usepackage[
backend=biber,
bibencoding=utf-8,
natbib,
style=authoryear,
maxcitenames=9, % use "et al" for > 9 (citations)
maxbibnames=9, % use "et al" for > 9 (references)
giveninits, % initialize given names
@Fylwind
Fylwind / 3.c
Last active April 15, 2016 05:21
:3
#include<stdio.h>
int((
main(void
))) {3; char
(XD [])
={*
":D",-3
*3+0x3c
,3*
#include <stdint.h>
#include <string.h>
struct alpha {
int8_t a;
int8_t b;
int8_t c;
int8_t d;
int8_t e;
int8_t f;
@Fylwind
Fylwind / euler67.hs
Created June 13, 2015 05:05
Solution to Euler problem 67 in Haskell
main :: IO ()
main = do
print (maxTotal [[3], [7, 4], [2, 4, 6], [8, 5, 9, 3]])
print . maxTotal . parseTable =<< readFile "p067_triangle.txt"
maxTotal :: [[Int]] -> Int
maxTotal tree = case triangularFold getMax tree of
[x] -> x
_ -> error "maxTotal: invalid input"
where getMax x t t' = x + max t t'
class Future(object):
def __call__(self, *args, **kwargs):
return self._perform(lambda: self._value(*args, **kwargs))
def __getattr__(self, name):
if name[0] == "_":
return self.__dict__[name]
return self._perform(lambda: getattr(self._value, name))
def __setattr__(self, name, value):
if name[0] == "_":
self.__dict__[name] = value
@Fylwind
Fylwind / vuhdo-absorption.patch
Last active August 29, 2015 14:07
A patch for adding two new Bouquet Statusbars to the VuhDo addon: Total absorption % and Excess absorption %, which show the amount of absorption on a unit as a fraction of the unit's maximum health. "Total" refers the sum of all absorption effects, while "Excess" refers the sum of all absorption effects minus the amount of missing health.
--- VuhDo/VuhDoBouquetValidators.lua 2014-10-16 04:18:04.000000000 -0400
+++ VuhDo/VuhDoBouquetValidators.lua 2014-10-15 23:11:25.199736500 -0400
@@ -646,12 +646,31 @@
return true, nil, VUHDO_getIncHealOnUnit(anInfo["unit"]), -1, anInfo["healthmax"];
end
--
+local function VUHDO_statusExcessAbsorbValidator(anInfo, _)
@Fylwind
Fylwind / keybase.md
Created May 11, 2014 06:12
Keybase proof

Keybase proof

I hereby claim:

  • I am Fylwind on github.
  • I am fylwind (https://keybase.io/fylwind) on keybase.
  • I have a public key whose fingerprint is 04DE 1E02 DB57 EF54 DD35 A9E4 5179 CE65 5271 837D

To claim this, I am signing this object: