Skip to content

Instantly share code, notes, and snippets.

@coyotte508
coyotte508 / gist:3025095
Created Jun 30, 2012
How to add line numbers to a file (with preserving the BOM character) on PO (all .txt files of a subfolder)
View gist:3025095
find db/moves -name "*.txt" -exec bash -c './remove-bom.sh {} && awk '\''{ print NR-1 " " $0 }'\'' {} > {}~ && mv {}~ {} && ./add-bom.sh {}' \;
@coyotte508
coyotte508 / gist:3028568
Created Jul 1, 2012
Remove lines only containing a line number and a space
View gist:3028568
find db/moves -name "*.txt" -exec bash -c "sed '/^[0-9]* \$/d' {} > {}~ && mv {}~ {}" \;
@coyotte508
coyotte508 / gist:3028770
Created Jul 1, 2012
Remove language _xx extensions to txt files
View gist:3028770
find . -name "*.txt" -exec bash -c "re=\$(echo {} | sed 's/_[A-Za-z-]*[.]txt/.txt/'); mv {} \$re" \;
View changelog-0-to-1.txt
I hear you like mudkipz, don't you!?!
@coyotte508
coyotte508 / gist:3095069
Last active Oct 7, 2015
Change log for 2.0.05+
View gist:3095069
=== 2.0.1 ===
All:
- Event Victini and Deoxys added
Client
- Battle Window improvements (size change, new moves, zoomed in pokemon, animated pokemon sprites, PP count of foe)
- Replay viewer improvement (controls)
- Enable register button on cancelling
- Smogon plugin now integrated in teambuilder
@coyotte508
coyotte508 / gist:3102488
Created Jul 13, 2012
Removes background from RBY images
View gist:3102488
find . -name "*.png" -exec convert '{}' -bordercolor white -border 1x1 -fill none -draw 'matte 0,0 floodfill' -shave 1x1 '{}' \;
(since the images themselves contained white, a simple replace wouldn't have been good)
@coyotte508
coyotte508 / gist:4169697
Created Nov 29, 2012
Old NB RPG script
View gist:4169697
//Record
//Check
//Save
//Reload
//Switch
//Show
//ShowTeam
//Pokedex
//Commands
//HelpMe
View gist:4256786
soundManager.createSound(): Audio support is not available.
soundManager.createSound(): Audio support is not available.
runMajor args: ["join","niffirgj"], kwargs: {},preempt: undefined
runMajor args: ["join","AlphonseE"], kwargs: {},preempt: undefined
runMajor args: ["player","p1","niffirgj","170"], kwargs: {},preempt: undefined
runMajor args: ["player","p2","AlphonseE","76"], kwargs: {},preempt: undefined
runMajor args: ["gametype","singles"], kwargs: {},preempt: undefined
runMajor args: ["tier","OU"], kwargs: {},preempt: undefined
runMajor args: ["rated"], kwargs: {},preempt: undefined
@coyotte508
coyotte508 / gist:4278752
Created Dec 13, 2012
how to log a battle
View gist:4278752
BattleOld=Battle;
Battle = function Battle() {
var self = this, run, getPoke;
BattleOld.apply(self, arguments);
run = self.run;
self.run = function(str, preempt) {
console.log("run: " + str); run.apply(self,arguments);
};
getPoke = self.getPokemon;
View gist:4283941
coyotte@ns220747:~/alpha/bin$ gdb -p 23287
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>.