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(netstat). | |
-compile([export_all]). | |
-record(sock, {port, local, peer, stat, proc}). | |
retinfo({State, Term}) when is_atom(State) -> | |
Term. | |
sockinfo(Port, PortInfo) -> | |
Proc = proplists:get_value(connected, PortInfo), |
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 escript | |
-mode(compile). | |
-compile(export_all). | |
main([]) -> io:format("Usage: ~s URL [Count=1000]~n", [escript:script_name()]); | |
main([URL]) -> main([URL,"100"]); | |
main([URL,C] ) -> manage_workers(URL, [start_worker(URL, N) || N <- lists:seq(1,list_to_integer(C))]), ok. |
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
xml2_sax_sample: xml2_sax_sample.c | |
gcc -o xml2_sax_sample `xml2-config --cflags --libs` xml2_sax_sample.c | |
clean: | |
rm xml2_sax_sample |
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 logging | |
from world import World | |
from heapq import heappush, heappop | |
from test_emulators import run_interactively | |
class LambdaFields(object): | |
# fields: [(int LambdaCoordinate, [int] LambdaField)] | |
# list of individual fields produced by each lambda | |
# LambdaCoordinate is the 1d coordinate of lambda in the world | |
# LambdaField is the list of effects that the field has on each of the cells |
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 python | |
""" | |
Copyright 2011 Domen Kozar. All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are | |
permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this list of | |
conditions and the following disclaimer. |
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
xml2_sax_sample: xml2_sax_sample.c | |
gcc -o xml2_sax_sample `xml2-config --cflags --libs` xml2_sax_sample.c | |
clean: | |
rm xml2_sax_sample |
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(date_util). | |
-compile(export_all). | |
epoch() -> | |
now_to_seconds(now()) | |
. | |
epoch_hires() -> | |
now_to_seconds_hires(now()) | |
. |
NewerOlder