Skip to content

Instantly share code, notes, and snippets.

View takkaria's full-sized avatar

Anna Sidwell takkaria

  • @PeopleRetrofit
  • Berlin, DE
View GitHub Profile
@takkaria
takkaria / gist:392949159e08f0bb551a
Last active August 29, 2015 14:00
Echo automated test
// Login
function login() {
var USER = 'andi@takkaria.org';
var PASSWORD = 'xxx';
casper.thenOpen('http://echomanchester.net/admin/');
casper.then(function() {
this.fill('form', {
'email': USER,
@takkaria
takkaria / trap.txt.diff
Last active August 29, 2015 14:05
Trap effects being written fully in trap.txt...
#
# New things here:
# - New kind of effect parameter 'msg', which displays the given text when the effect
# is executed
# - Flow control in the effects code
# - A few new effects for effects.c (but not many)
#
# New flow control effect types:
# - 'CHECK_FEATHER_FALL' which checks the if the player has feather falling.
# If they do, display the message and abort execution of later effects
@takkaria
takkaria / gist:8069e33e275a5daca7f7
Created September 4, 2014 10:18
new textui birth process description
quickstart_allowed() -> p_ptr->ht_birth ? TRUE : FALSE
process:
textui_birth()
@takkaria
takkaria / gist:d560bc8f85a22dee2eb7
Created October 22, 2014 12:23
tester for echo feedfetch
fs = require('fs')
text = fs.readFileSync('findDate.json', 'utf8');
tests = JSON.parse(text);
Date.prototype.toShortISOString = function() {
function pad(number) {
if (number < 10)
return '0' + number;
else
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Raleway:700,500">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<style>
h1, h2, h3, h4, h5, h6 { font-family: "Raleway"; }
#map-canvas { width: 100%; height: 300px; }
@takkaria
takkaria / core-ui-splt
Last active August 29, 2015 14:09
angband core-ui split design doc
Angband core-UI split
=====================
This document rather hopefully describes a methodology for continuing work on the split. It does so instead of specifying particular things that need to be done in the hope that it's more illuminating and useful for others.
12 step plan:
1-3. Accept a higher power and its providence over the following task.
4-6. Split UI stuff into ui* files; make sure that only ui-* files include ui-* or z-term headers
7-9. Write tests that use the command & event interfaces to do stuff and get them passing.
@takkaria
takkaria / gist:1cc7ac38330a30691c19
Last active August 29, 2015 14:22
Some thoughts on the building blocks of better Angband tile handling

Here I propose two new modules (panel and grafgrid) along with some changes to z-term, that will help build new graphics handling without duplication and while keeping the logic of graphics handling cross-platform. This is not an exhaustive list of steps but could form a barebone structure to develop further.

The two new modules handle all the hard work of panel tracking and efficient redraws, so that all the frontend has to do, much like z-term, is draw the right things when it's told to. Both new modules should be relatively easy to build using unit tests.

The upshot of this is that we draw the graphics to a separate canvas to the term display, and then blit them onto the final display surface one after the other, perhaps double-buffering if appropriate.

TO RESOLVE:

  • if we are to transition for separate graphic files per tile, then maybe we should include a module for managing that, too. but the current attr/char method is locked in for now, until the above system works on all curren
@takkaria
takkaria / gist:c303f19c43565ef77c34
Created June 12, 2015 18:52
Notes from reading SMACSS
  • Split into base (single element styles), layout (grids etc), modules
  • Modules are defined by a class
  • Avoid using context to style things - e.g. #pagename .modulename - use sub-classing instead
@takkaria
takkaria / mk_dkimpair.sh
Created February 14, 2016 04:00
Create a DKIM keypair
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "Use: $0 <domain name>"
exit 1
fi
DOMAIN=$1
@takkaria
takkaria / dwarf.diff
Created June 11, 2016 23:24
Potential fix for gold detection redraw issues
diff --git a/src/effects.c b/src/effects.c
index 9c09734..58e64df 100644
--- a/src/effects.c
+++ b/src/effects.c
@@ -1228,6 +1228,7 @@ bool effect_handler_DETECT_GOLD(effect_handler_context_t *context)
if (square_hasgoldvein(cave, y, x)) {
/* Memorize */
square_memorize(cave, y, x);
+ square_light_spot(cave, y, x);