This file contains hidden or 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
+static inline gboolean | |
+is_domain_valid (const char *str) | |
+{ | |
+ return (str && (strlen(str) >= 1) && (strlen(str) <= 255)); | |
+} | |
+ |
This file contains hidden or 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
[nelhage@aeronautique:/tmp/tmp.cF4Y5zMVY1]$ mkdir a b | |
[nelhage@aeronautique:/tmp/tmp.cF4Y5zMVY1]$ mkdir -p a/assets a/lib/assets | |
[nelhage@aeronautique:/tmp/tmp.cF4Y5zMVY1]$ touch a/assets/file | |
[nelhage@aeronautique:/tmp/tmp.cF4Y5zMVY1]$ touch a/lib/assets/file | |
[nelhage@aeronautique:/tmp/tmp.cF4Y5zMVY1]$ rsync -nPax --exclude='/assets/*' a/ b/ | |
sending incremental file list | |
./ | |
assets/ | |
lib/ | |
lib/assets/ |
This file contains hidden or 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
[nelhage@aeronautique:/tmp]$ curl -s 'http://pastebin.com/raw.php?i=dAybWC0C' -o urls.raw | |
[nelhage@aeronautique:/tmp]$ tr -d '\r' < urls.raw | sed 's,\?.*,,' | sort -u > urls.uniq | |
[nelhage@aeronautique:/tmp]$ wc -l urls.uniq | |
750 urls.uniq | |
[nelhage@aeronautique:/tmp]$ perl -lane 'print $1 if m{/(\d{4}/\d{2}/\d{2})/}' urls.uniq | sort | uniq -c | sort -rn | head | |
131 2013/06/11 | |
116 2013/06/09 | |
61 2013/06/12 | |
45 2013/06/10 | |
38 2013/06/06 |
This file contains hidden or 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
*.pyc |
This file contains hidden or 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
[nelhage@aeronautique:~]$ echo hello? | |
hello? | |
[nelhage@aeronautique:~]$ shopt -s failglob | |
[nelhage@aeronautique:~]$ echo hello? | |
bash: no match: hello? | |
[nelhage@aeronautique:~]$ shopt -s nullglob | |
[nelhage@aeronautique:~]$ shopt -u failglob | |
[nelhage@aeronautique:~]$ echo hello? | |
[nelhage@aeronautique:~]$ |
This file contains hidden or 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
NAME | |
git-drunk - An alcoholic celebration of version control | |
SYNOPSIS | |
git drunk [-s | --shots] [-i | --iced] [--alcohol=<beverage>] | |
[--mixer=<mixer>] [--shaken | --stirred] [--girly] | |
[--garnish=<...>] [--class=bouncy|smashy] | |
git drunk [--drinking-game=gitionary|...] | |
DESCRIPTION |
This file contains hidden or 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
/* Excerpted from https://github.com/mongodb/mongo/blob/ea83ad3103fef1664e9385d48537c4163344ce8a/src/mongo/util/debug_util.h#L37 */ | |
// The following declare one unique counter per enclosing function. | |
// NOTE The implementation double-increments on a match, but we don't really care. | |
#define MONGO_SOMETIMES( occasion, howOften ) for( static unsigned occasion = 0; ++occasion % howOften == 0; ) | |
#define SOMETIMES MONGO_SOMETIMES | |
#define MONGO_OCCASIONALLY SOMETIMES( occasionally, 16 ) | |
#define OCCASIONALLY MONGO_OCCASIONALLY |
This file contains hidden or 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 main | |
import "log" | |
func main() { | |
var a [128]byte | |
log.Printf("len(a) = %d", len(a)) | |
log.Printf("cap(a) = %d", cap(a)) | |
log.Printf("len(a[:10]) = %d", len(a[:10])) | |
log.Printf("cap(a[:10]) = %d", cap(a[:10])) |
This file contains hidden or 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
\PRESETS{Char}{ | |
\FD\MYdesc {} %% badge description | |
\FD\MYstats {} %% use \newstat to add stats | |
% \newstat\MYcr {Combat Rating}{CR}{2} %% for DarkWater-style combat | |
\newstat\MYpsi {$\psi$}{$\psi$}{$7,9,11,13$} | |
\newstat\MYdrunk {$\iota$}{$\iota$}{0} | |
\newstat\MYdelta {$\delta$}{$\delta$}{} | |
\newstat\MYtau {$\tau$}{$\tau$}{10} |
This file contains hidden or 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%%%%%%%%%%%%%%%%%%%%%%%% datatypes.sty %%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% | |
%% Commands Provided: | |
%% | |
%% \DECLARETYPE{Foo} | |
%% \DECLARESUBTYPE{Foobar}{Foo} | |
%% | |
%% \PRESETS{Foobar}{STUFF} |