Skip to content

Instantly share code, notes, and snippets.

@Artanis
Artanis / long-if.dart
Created March 7, 2015 09:06
Code formatting example
// For https://plus.google.com/+dartlang/posts/Qy6HJPxgTfm
// Break after OR operations.
// Break before and indent AND operations.
// Evaluate groups recursively.
if (tag=='style' ||
tag=='script'
&& (type=null || type==TYPE_JS || type==TYPE_DART) ||
tag=='link'
&& (rel=='stylesheet' || rel=='import')) {}
@Artanis
Artanis / passwordsafe-sync.md
Last active April 18, 2019 10:43
Build a syncronized password store using PasswordSafe and Google Drive, Dropbox, or Box.
@Artanis
Artanis / ts-per-server-settings.rst
Created November 3, 2014 03:01
Per-server Settings in Teamspeak

Per-server Settings in Teamspeak

Capture Settings

This allows you to make some servers push-to-talk and others voice activated.

  1. Open Options (Alt-P).
@Artanis
Artanis / blurtext-spoilers.css
Last active November 1, 2018 16:42
Change Invistext (color=transparent, usually used for spoilers) to blurred text, hover for less blur, hold down mouse button to reveal hidden text.
/* Invisitext to Blurtext
Author: Erik Youngren <artanis.00@gmail.com>
Webpage: https://gist.github.com/Artanis/d7bc3266f3b8c383bf11
Licence: http://opensource.org/licenses/MIT
Targets: http://forums.sufficientvelocity.com
http://forums.spacebattles.com
README
======
def debug(msg):
print("calling debug decorator")
def actual_decorator(fn):
print("calling actual_decorator")
def wrapper(*args):
print("calling wrapper with" + str(args))
print(msg)
print("calling " + fn.__name__)
return fn(*args)
print("returning wrapper")
@Artanis
Artanis / minecraft-ultimate-tool-set.rst
Last active September 26, 2021 03:21
Crazy items in Minecraft.

Minecraft Ultimate Tool Set

Requires creative mode or operator power on a multiplayer server. On a single player game (survival or hardcore), you will need "cheats" enabled to move into creative mode. Don't forget to leave creative mode when done.

These items might be stupid. Be prepared to repair the country-side.

@Artanis
Artanis / entanglement_set_tiles.js
Last active March 4, 2020 01:12
Hacking around in Entanglement for fun. Quick function that replaces all the randomized tiles with one provided by the player.
// Run this in the JavaScript console of the Entanglement game.
// Code targets Entanglement on 2013-10-13
// http://entanglement.gopherwoodstudios.com
//
// Replays of games using this will be horribly broken
/* Replaces all possible tiles with the given tile.
*
* Cannot replace the first tile, nor the first swap tile.
*
@Artanis
Artanis / unity.gitignore
Created June 7, 2013 08:43
Unity .gitignore
*.csproj
*.pidb
*.sln
*.userprefs
Library
Temp
Assets/-tk2d
Assets/Resources/tk2d/*
"""Uses tulip to download zeroes.
After getting the zeroes, counts them, and prints the number of zeroes
requested and the the number received.
On my machine, this begins to diverge at approximately 16300 (~16318, and 16384
seems popular). Anything below that is correct, anything above starts losing
bytes. Larger numbers (I accidentally 2**16000 a few times) seem to result in
receiving about 5000.
@Artanis
Artanis / FrozenSet.py
Created August 4, 2012 00:51
frozenset with Axiom of Choice
# Copyright (c) 2012, Erik Youngren <artanis.00@gmail.com>
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer. Redistributions in binary
# form must reproduce the above copyright notice, this list of conditions and
# the following disclaimer in the documentation and/or other materials provided