Skip to content

Instantly share code, notes, and snippets.

View Gustav-Simonsson's full-sized avatar
💭
tuning into the gpu coil whine

Gustav-Simonsson

💭
tuning into the gpu coil whine
View GitHub Profile
package main
import (
"fmt"
"time"
"math"
"code.google.com/p/go.crypto/scrypt"
)
func main() {
import com.google.bitcoin.uri.BitcoinURI;
String uri = BitcoinURI.convertToBitcoinURI(address,
output.getValue(),
"very currency",
"such profit");
-define(info, lager:info).
-define(debug, lager:debug).
-define(warning, lager:warning).
-define(error, lager:error).
-define(alert, lager:alert).
-define(mute_level(LogLevel),
begin
error_logger:tty(false),
-module(stacktrace_filter).
-compile(export_all).
t() ->
try
sensitive_data_function()
catch
Error:Reason ->
{Error, Reason, erlang:get_stacktrace()}
end.
--
-- xmonad example config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
import XMonad
decode(Segment) ->
case Segment of
<< SourcePort:16, DestinationPort:16,
SequenceNumber:32,
AckNumber:32,
DataOffset:4, _Reserved:4, Flags:8, WindowSize:16,
Checksum:16, UrgentPointer:16,
Payload/binary>> when DataOffset>4
->
OptSize = (DataOffset - 5)*32,
%%%============================================================================
-spec bin_to_hexdigest(binary()) -> binary().
bin_to_hexdigest(Bin) when is_binary(Bin) ->
<<<<(binary:list_to_bin(
case length(S = integer_to_list(I, 16)) of 1 -> [48|S]; 2 -> S end
))/bytes>> || <<I>> <= Bin>>.
-spec hexdigest_to_bin(binary()) -> binary().
hexdigest_to_bin(BinHex) when is_binary(BinHex) ->
-module(crack).
-export([crack/0]).
-compile(export_all).
-define(CHAR_LIST, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW").
crack() ->
TryLength = 5,
MD5Hash = crypto:md5("12345"),
@Gustav-Simonsson
Gustav-Simonsson / gist:4564450
Created January 18, 2013 13:07
migrate_module
migrate_module(Module, Function, Arity, RemoteNode) ->
%% Assume Arity is 2, general arity solution needed.
RPCFun = fun(Arg1, Arg2) ->
rpc:call(RemoteNode, Module, Function, [Arg1, Arg2]) end,
meck:new(Module),
meck:expect(Module, Function, RPCFun).
@Gustav-Simonsson
Gustav-Simonsson / gist:4564310
Created January 18, 2013 12:35
migrate with rpc
5> el_pl:is_sublist([apa], [apa, varg]).
true
6> meck:new(el_pl).
ok
7> meck:expect(el_pl, is_sublist, fun(List1, List2) ->
rpc:call('nodeattmigreratill@vargarna.nu', el_pl, is_sublist, [List1, List2]) end).
ok
8>