Skip to content

Instantly share code, notes, and snippets.

View shizzard's full-sized avatar

Denis Fakhrtdinov shizzard

View GitHub Profile
-module(huify).
-export([huify/1]).
-define(cl_vowels(),
[$а, $е, $ё, $и, $о, $у, $ы, $э, $ю, $я]).
-define(cl_consonants(),
[$б, $в, $г, $д, $ж, $з, $к, $л, $м, $н, $п, $р, $с, $т, $ф, $х, $ц, $ч,
$ш, $щ]).
-define(cl_etc(),
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% RELOADERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
lm() ->
[c:l(M) || M <- mm()].
mm() ->
modified_modules().
modified_modules() ->
new_spec__() ->
?es:attribute(?es:atom(spec), [
?es:tuple([
?es:tuple([
?es:atom(?cloak_generated_function_new),
?es:integer(?cloak_generated_function_new_arity)
]),
?es:list([
?es:tuple([?es:atom(type), ?es:integer(0), ?es:atom('fun'), ?es:list([
?es:tuple([?es:atom(type), ?es:integer(0), ?es:atom(product), ?es:list([
{tree,attribute,
{attr,8,[],none},
{attribute,
{tree,atom,{attr,8,[],none},spec},
[{tree,tuple,
{attr,8,[],none},
[{tree,tuple,
{attr,0,[],none},
[{tree,atom,{attr,0,[],none},some_function},
{tree,integer,{attr,0,[],none},1}]},
-module(priv_basic).
-compile({parse_transform, cloak_transform}).
-record(?MODULE, {
a,
b = atom,
prot_c = 0,
priv_d = 0
}).
(evadev@shizz-worktop)3> himem(300000).
[{<0.7.0>,426512},{<0.6.0>,688816}]
(evadev@shizz-worktop)4> pi(himem(300000)).
** process <0.7.0> (registered as application_controller) is now waiting **
initial call: gen_server:loop/6
current function: erlang:apply/2
dictionary: [{'$ancestors',[<0.2.0>]},
{'$initial_call',{application_controller,start,1}}]
total memory: undefined
linked to: [<0.90.0>,<0.109.0>,<0.115.0>,<0.250.0>,<0.102.0>,
@shizzard
shizzard / remsh.erl
Created November 20, 2015 14:24 — forked from davisp/remsh.erl
A remsh that logs every session to ~/.remsh.log
#! /usr/bin/env escript
%%! -hidden -noshell -noinput
-mode(compile).
-export([
init_shell_log/1
]).
request: object(
host: string,
method: enum("GET", "POST", "PUT", "DELETE"),
params: list(
object(
name: string,
value: string
)
)
)
curl "localhost:12330/counter?action=offer_complete&sid=123123123&hash=epttest&hashVar=epttest"
<<"{\"method\":\"completeOffer\",\"sid\":\"123123123\",\"hash\":\"epttest\",\"hashVar\":\"epttest\"}">>
-module(handler_param_action).
-behaviour(gen_handler).
-include("ept.hrl").
-include("ept_hit.hrl").
-include_lib("cowboy/include/http.hrl").
-export([prepare/2, handle/1]).