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
module Mud.Thing.Parse where | |
import Text.ParserCombinators.Parsec | |
import Mud.Thing.Data | |
import Mud.Thing.Eval | |
-- Parse comment (starting with '#' until end of line). | |
comment = do |
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 | |
# Firefox keeps creating the ~/Desktop directory for some reason whenever the preferences are opened. This little script keeps your $HOME clean until those Mozilla monkeys finally fix that sh*t. | |
use strict; | |
use warnings; | |
use Linux::Inotify2; | |
my $inotify = new Linux::Inotify2 or die "Narf!\n"; |
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; | |
use Chart::Pie; | |
use IO::File; | |
my $pie = Chart::Pie->new(640, 480); | |
my $score; |
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
-- ZChart | |
-- Find the 10 most popular commands from your ZSH history and build a Google | |
-- Chart from it. Prints the charts URL to stdout and saves it as PNG in | |
-- "history.png". | |
import System.IO | |
import System.Environment | |
import Data.List |
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
import Data.Char | |
import Data.String.Utils | |
import Data.List | |
import System.Environment | |
import System.Exit | |
import System.Cmd | |
import Control.Concurrent |
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
-- | |
-- This was supposed to be my solution for the Code Golf at Stack Overflow: | |
-- http://stackoverflow.com/questions/3324301/code-golf-digital-clock | |
-- | |
-- However, when I finished, that thread was closed and I couldn't post it | |
-- anymore. :( | |
-- | |
main = getLine >>= \ n -> mapM_ (\ s -> putStrLn $ d s n) l |
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/env perl | |
use strict; | |
use warnings; | |
use Mojolicious::Lite; | |
use Mojo::Redis2; | |
use Mojo::URL; | |
use Mojo::Util qw( b64_encode ); |
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
#include <signal.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <netdb.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <assert.h> | |
#include <time.h> |
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
[jkramer/mk-17:~]# <foo.awk | |
BEGIN { | |
for(i = 0; i < 5; i++) { | |
"date +%s" | getline sec | |
print sec | |
system("sleep 1") | |
} | |
} | |
[jkramer/mk-17:~]# gawk -f foo.awk |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <signal.h> | |
void print_n(const char *, const char *, const char *, int); | |
int main(int argc, char ** argv) { | |
unsigned wheels = 12; | |
char opt; |
OlderNewer