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
| #include <cstdlib> | |
| #include <deque> | |
| #include <iostream> | |
| #include <boost/bind.hpp> | |
| #include <boost/asio.hpp> | |
| #include <boost/thread.hpp> | |
| using namespace std; | |
| using boost::asio::ip::tcp; |
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
| import os | |
| import random | |
| import tornado.httpserver | |
| import tornado.ioloop | |
| import tornado.web | |
| names = ['Nick', 'Steve', 'Andy', 'Qi', 'Fanny', 'Sarah', 'Cord', 'Todd', 'Chris', 'Pasha', 'Gabe', 'Tony', 'Jason', 'Randal', 'Ali', 'Kim', 'Rainer'] | |
| def randline(): | |
| text = 'commit_messages.txt' |
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
| <a href="http://wow.mygamemug.com/register/user/?group_id=5158&t=BADGE_REF_CODE.izmUykZYhAwm4ykh6fzwIA"><img src="http://www.mygamemug.com/groups/7jYDfcV34TMZ/on-the-clock-lightbringer-us/badges/recruit.png" /></a> |
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
| /* | |
| Copyright (c) 2010 Nick Gerakines <nick at gerakines dot net> | |
| */ | |
| #include <sys/types.h> | |
| #include <sys/time.h> | |
| #include <sys/stat.h> | |
| #include <sys/queue.h> | |
| #include <stdlib.h> | |
| #include <err.h> |
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
| nowheremachine:heman nick$ make | |
| make all-recursive | |
| Making all in src | |
| gcc -DHAVE_CONFIG_H -I. -I.. -Wall --std=c99 -fgnu89-inline -g -O2 -MT heman-heman.o -MD -MP -MF .deps/heman-heman.Tpo -c -o heman-heman.o `test -f 'heman.c' || echo './'`heman.c | |
| heman.c: In function ‘on_read’: | |
| heman.c:82: error: ‘bert_data_t’ has no member named ‘tuple’ | |
| make[2]: *** [heman-heman.o] Error 1 | |
| make[1]: *** [all-recursive] Error 1 | |
| make: *** [all] Error 2 |
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
| -module(slug). | |
| -compile(export_all). | |
| test() -> [ | |
| {slugify("Hello World"), "hello-world"}, | |
| {slugify(" HELLO *(^&)*(&* WORLD "), "hello-world"} | |
| ]. | |
| slugify(String) -> | |
| slugify(String, []). |
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
| -module(spiral). | |
| -compile(export_all). | |
| %% -- if accumulator is empty, put first row into acc and continue | |
| %% -- if last accum value is first value of row 1, put row one into accum and continue | |
| %% -- if last accum value is last value of row one, collect all last row values into accum and continue | |
| %% -- if last accum value is last value of last row, collect last row into accum and continue | |
| %% -- if last accume value is first value of last row, collect first values into accum and continue | |
| follow2() -> |
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
| %% Store username as binary | |
| mnesia:transform_table(user, fun({user, Id, Name, Streak, Current, Last, Imp}) -> {user, Id, list_to_binary(Name), Streak, Current, Last, Imp} end, [id, username, longest_streak, current_streak, last_updated, importance], user). | |
| %% Reference username and projects as binary | |
| TransFun = fun({day, Id, Username, Date, Projects}) -> | |
| {day, {list_to_binary(Username), Date}, list_to_binary(Username), Date, lists:usort([ list_to_binary(P) || P <- Projects])} | |
| end. | |
| [ begin [Record] = mnesia:dirty_read(day, Key), mnesia:dirty_delete_object(day, Record), mnesia:dirty_write(day, TransFun(Record)) end || Key <- mnesia:dirty_all_keys(day)]. |
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
| local EDGEGAP, ROWHEIGHT, ROWGAP, GAP = 16, 19, 2, 4 | |
| -- Core reminders anchor. | |
| -- ---------------------- | |
| local anchor = CreateFrame("Button", nil, UIParent) | |
| local rows = {} | |
| local text = anchor:CreateFontString(nil, nil, "GameFontNormalSmall") | |
| text:SetPoint("CENTER") |
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
| {"ts" : "Tue Nov 03 2009 11:55:28 GMT-0800 (PST)" , "info" : "query iplaywar.gorfang ntoreturn:1 reslen:381 nscanned:1 | |
| query: { query: { name: \"Podgaz\" } } nreturned:1 bytes:365 124ms" , "millis" : 124} | |
| {"ts" : "Tue Nov 03 2009 11:55:29 GMT-0800 (PST)" , "info" : "query iplaywar.gorfang ntoreturn:1 reslen:36 nscanned:0 | |
| query: { query: { name: \"Rrandd\" } } nreturned:0 bytes:20 100ms" , "millis" : 100} | |
| {"ts" : "Tue Nov 03 2009 11:55:32 GMT-0800 (PST)" , "info" : "query iplaywar.volkmar ntoreturn:1 reslen:388 nscanned:1 | |
| query: { query: { name: \"Baalzephon\" } } nreturned:1 bytes:372 120ms" , "millis" : 120} | |
| > db.system.profile.find().skip(180) | |
| {"ts" : "Tue Nov 03 2009 11:53:31 GMT-0800 (PST)" , "info" : "query iplaywar.gorfang ntoreturn:1 reslen:379 nscanned:1 | |
| query: { query: { name: \"Sendintheworms\" } } nreturned:1 bytes:363 136ms" , "millis" : 136} | |
| {"ts" : "Tue Nov 03 2009 11:53:42 GMT-0800 (PST)" , "info" : "query iplaywar.darkcrag ntoreturn:1 reslen:372 nscanned:1 |