exec([fun fun1/3, fun fun2/4, fun fun3/1], [Arg1, Arg2, Arg2]).
fun1(Arg1, Arg2, Arg3) ->
P = proplists:get_value(p, Arg1),
{ok, [P, Arg1, Arg2, Arg3]}.
fun2(P, Arg1, Arg2, Arg3) ->
do_stuff(P, Arg1, Arg2),
{ok, [Arg3]}.
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(date_util). | |
-compile(export_all). | |
epoch() -> | |
now_to_seconds(now()) | |
. | |
epoch_hires() -> | |
now_to_seconds_hires(now()) | |
. |
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
batterywidget = wibox.widget.textbox() | |
batterywidget:set_text(" | Battery | ") | |
batterywidgettimer = timer({ timeout = 5}) | |
batterywidgettimer:connect_signal("timeout", | |
function() | |
fh = assert(io.popen("acpi | cut -d, -f 2,3 -", "r")) | |
batterywidget:set_text(" |" .. fh:read("*.l") .. " | ") | |
fh:close() | |
end | |
) |
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
URxvt.depth: 32 | |
#URxvt.geometry: 90x30 | |
URxvt.background: rgba:4444/4444/4444/9999 | |
URxvt.scrollBar: false | |
URxvt.font: xft:Source Code Pro:size=7 | |
URxvt.letterSpace: -2 | |
URxvt.foreground: rgb:bbbb/bbbb/bbbb | |
Xft.dpi: 144 | |
Xft.antialias: true |
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 unittest, os, os.path, sys, urllib | |
import tornado.database | |
import tornado.options | |
from tornado.options import options | |
from tornado.testing import AsyncHTTPTestCase | |
# add application root to sys.path | |
APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
sys.path.append(os.path.join(APP_ROOT, '..')) |
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
SHOPIFY_CLIENT_ID "123456789" |
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 escript | |
%%! -smp enable -sname update | |
main([Path]) -> | |
SPath = string:strip(Path, right, $/), | |
{ok, Dirs} = file:list_dir(SPath), | |
[files(SPath ++ "/" ++ Dir) || Dir <- Dirs]; | |
main(_) -> | |
io:format("Usage: update [path/to/directory]~n"). |
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
<?php | |
// ... rest of module stuff | |
/** | |
* Set the 'cookies_allowed' cookie | |
* | |
* @access public | |
* @return 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
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(Beam,[abstract_code]). | |
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]). |
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
(define-key evil-normal-state-map ",f" (lambda () | |
(interactive) | |
(dired default-directory) | |
)) |
NewerOlder