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
| iso_8601_fmt(DateTime) -> | |
| {{Year,Month,Day},{Hour,Min,Sec}} = DateTime, | |
| io_lib:format("~4.10.0B-~2.10.0B-~2.10.0B ~2.10.0B:~2.10.0B:~2.10.0B", | |
| [Year, Month, Day, Hour, Min, Sec]). | |
| ts() -> | |
| io_lib:format("~s", [iso_8601_fmt(erlang:localtime())]). |
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
| --- inet_drv.c.orig 2011-08-11 14:46:15.000000000 +0200 | |
| +++ inet_drv.c 2011-08-11 14:48:13.000000000 +0200 | |
| @@ -3453,9 +3453,11 @@ | |
| /* Check the size of SCTP AssocID -- currently both this driver and the | |
| Erlang part require 32 bit: */ | |
| ASSERT(sizeof(sctp_assoc_t)==ASSOC_ID_LEN); | |
| -# ifndef LIBSCTP | |
| -# error LIBSCTP not defined | |
| -# endif | |
| +/*# ifndef LIBSCTP*/ |
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
| #!/usr/bin/env python | |
| import sys | |
| import time | |
| import os | |
| import resource | |
| import subprocess | |
| def spawn(proc): | |
| kw = { |
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
| {deps, [ | |
| {binpp, ".*", {git, "git://github.com/aerosol/binpp.git", "master"}} | |
| ]}. |
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
| validate_rules() -> | |
| ?SYS_INFO("Validating common rules configuration..."), | |
| case compile:file(?PRIV("common_rules.erl"), [strong_validation, report, return, {i, ?PRIV("../include")}]) of | |
| {ok, _, _} -> | |
| ?SYS_DEBUG("File common_rules.erl validated successfully"), | |
| ok; | |
| {ok, _, _, Warnings} -> | |
| ok; | |
| {ok, _, _, Warnings} -> | |
| case Warnings of |
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(rules). | |
| -compile([export_all]). | |
| %% quick n dirty sketch | |
| %% | |
| %% example: | |
| %% | |
| %% rules.txt | |
| %% | |
| %% route foo_backend when recipient matches "[0-9]{4}" |
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
| +---------------------------------------------------+ | |
| | The following takes place between 03:00 and 04:30 | | |
| +---------------------------------------------------+ | |
| 03:00 * toxik snickers | |
| 03:02 < toxik> [in #php] | |
| 03:02 < toxik> <@toxik> PHP -- one of few languages where a string can be false | |
| without being empty. | |
| 03:02 < toxik> <@toxik> And that's a god damn feature. :-) | |
| 03:02 < toxik> < Seph> a string should be neither true nor false, it should be |
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
| " Undo & history {{{ | |
| set history=1000 | |
| set undolevels=1000 | |
| " make sure tmp dir is created | |
| silent execute '!mkdir ~/.vim/tmp > /dev/null 2>&1' | |
| " delete junk older than 3 days | |
| silent execute '!find ~/.vim/tmp/ -type f -mtime +3 -exec rm {} \;' | |
| set undofile | |
| set undodir=~/.vim/tmp | |
| set backup |
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
| unconsult(File, L) -> | |
| {ok, S} = file:open(File, write), | |
| lists:foreach(fun(X) -> io:format(S, "~p.~n",[X]) end, L), | |
| file:close(S). |
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
| #!/bin/bash | |
| echo "Number of commits per author:" | |
| git --no-pager shortlog -sn --all | |
| AUTHORS=$( git shortlog -sn --all | cut -f2 | cut -f1 -d' ') | |
| OVERALL_ADDED=0 | |
| OVERALL_DELETED=0 | |
| OVERALL_CHANGED=0 | |
| for a in $AUTHORS | |
| do | |
| echo "Statistics for: $a" |