This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
{ | |
"c": "#ff6d1a", | |
"t": "#2b2c2e", | |
"a": 7 | |
}, | |
"esc\n\n\n\nsleep", | |
{ | |
"c": "#d9dae0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all clean server | |
all: htdocs/index.html htdocs/style.min.css | |
htdocs/index.html: data/* | |
perl blosxom.cgi -password=awesome | |
find htdocs -mindepth 2 -name 'index.rss' -delete | |
htdocs/style.min.css: style.less | |
lessc -x style.less > htdocs/style.min.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Email { | |
public: | |
Email(); | |
static Email* make_conference_email(const std::string& month); | |
static Email* make_angry_boss_email(const std::string& boss_name, int lives); | |
std::string from, subject, body; | |
bool conference; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Email { | |
public: | |
Email(); | |
static Email* make_conference_email(const std::string& month); | |
static Email* make_angry_boss_email(const std::string& boss_name, int lives); | |
std::string from, subject, body; | |
bool conference; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Irssi; | |
use strict; | |
use FileHandle; | |
use vars qw($VERSION %IRSSI); | |
$VERSION = "1.0"; | |
%IRSSI = ( | |
authors => 'Alan Berndt <alan@eatabrick.org>', | |
name => 'auto_away', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TaskerData sr="" dvi="1" tv="4.1u3m"> | |
<Profile sr="prof6" ve="2"> | |
<cdate>1371538376764</cdate> | |
<clp>true</clp> | |
<edate>1371851913695</edate> | |
<id>6</id> | |
<mid0>5</mid0> | |
<mid1>8</mid1> | |
<nme>Home</nme> | |
<State sr="con0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
John Holleran: How do I do "Q1 performance (70), refueling 20, pax 20" to "(70),20,20” | |
It really depends on what the whole data looks like not just one line, but I'll give it a shot. I have no idea how (un)familiar you are with regular expressions so I will assume you know nothing to err on the side of overexplanation. | |
As a warning, these are perl regular expressions. Whatever you are using has a different (and shittier) regex engine than perl does so some things might be a little bit different for you. If you tell me what language you are using, I might know more about its particular engine. If you tell me it is something that costs money like Oracle DB regex you are on your own, sorry. | |
Assuming that the text is mostly the same you could do something like | |
^Q[1-4] performance (\(\d+\)), refueling (\d+), pax (\d+)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#showtooltip 3 3 | |
/cleartarget | |
/tar tilled soil | |
/use [exists] 3 3; master plow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my %data = ( | |
subject => [ | |
'A <modifier> <person> named <name>', | |
'A <modifier> <person> named <name>', | |
'<title> <name>', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package HexBase64; | |
use strict; | |
use warnings; | |
use base 'Exporter'; | |
our @EXPORT = (qw(base64_to_hex hex_to_base64)); | |
# lookup tables for conversion |
NewerOlder