Skip to content

Instantly share code, notes, and snippets.

;;;
;;; By Zoid @BatMud
;;;
;;; Set stats
; /x_stats_set <str|dex|con|int|wis|cha|siz> <value>
/def -i x_stats_set=\
/let _name=x_stats_%{1}%;\
/let _prev=$[prgetval(_name)]%;\
/let _diff=$[{2} - {_prev}]%;\
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.glaurung.batMap.gui.search.SearchPanel.searchForRoomsWith(SearchPanel.java:94)
at com.glaurung.batMap.gui.search.SearchPanel.actionPerformed(SearchPanel.java:70)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:508)
at javax.swing.JTextField.postActionEvent(JTextField.java:721)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:836)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
### Keybase proof
I hereby claim:
* I am x1a0 on github.
* I am x1a0 (https://keybase.io/x1a0) on keybase.
* I have a public key whose fingerprint is A1C5 7E23 F214 D0B0 23DD EE5C 7611 A0C8 01E2 2E78
To claim this, I am signing this object:
;; enhance entity name card
/def -F -p100 -mregexp -t'^\| A ([a-z]+) (fire|air|water|earth) entity ([a-z]+) with power .+ \|$' x_rw_entity_card_scan=\
/let size=0%;\
/let adjective=0%;\
/if ({P1} =~ 'titchy') /let size=$[size+1]%;\
/elseif ({P1} =~ 'miniscule') /let size=$[size+2]%;\
/elseif ({P1} =~ 'small') /let size=$[size+3]%;\
/elseif ({P1} =~ 'medium') /let size=$[size+4]%;\
/elseif ({P1} =~ 'large') /let size=$[size+5]%;\
/elseif ({P1} =~ 'huge') /let size=$[size+6]%;\
var runFrom = function(step, lastStep, callback) {
var cb = step >= lastStep ? callback : function() {
runFrom(step + 1, lastStep, callback);
};
this['step' + step].call(this, cb);
};
runFrom(1, 17, function() {
console.log('finally done...');
});
@x1a0
x1a0 / map.tf
Created January 18, 2016 19:38 — forked from michael-donat/map.tf
; TEMP !!!!
/def -t'Nagle porywa cie nurt i niesie na wschod!' oxen_kanaly_event = \
/_map_go exit:e
;------------------------------------------------------------------------
; ... LISTY ... |
;------------------------------------------------------------------------
/set _map_standard_exits=\
n|polnoc|\
s|poludnie|\
@x1a0
x1a0 / sudo.zsh
Created February 18, 2014 16:04
zsh sudo
insert_sudo () { zle beginning-of-line; zle -U "sudo " }
zle -N insert-sudo insert_sudo
bindkey "^[s" insert-sudo
@x1a0
x1a0 / pre-push
Created February 11, 2014 10:33
Run test before pushing
#!/bin/bash
CMD="sbt test"
# Check if we actually have commits to push
commits=`git log @{u}..`
if [ -z "$commits" ]; then
exit 0
fi
@x1a0
x1a0 / csv2sc.py
Created January 21, 2014 23:18
Convert `.csv` to `.sc`
#!/usr/bin/env python
import sys
import string
if len(sys.argv) < 2:
print "Usage: %s infile [outfile] [delimiter_char]" % sys.argv[0]
sys.exit(1)
filename_in = sys.argv[1]
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F