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
%%%============================================================================ | |
-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) -> |
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
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, |
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
-- | |
-- 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 |
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(stacktrace_filter). | |
-compile(export_all). | |
t() -> | |
try | |
sensitive_data_function() | |
catch | |
Error:Reason -> | |
{Error, Reason, erlang:get_stacktrace()} | |
end. |
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
-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), |
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 com.google.bitcoin.uri.BitcoinURI; | |
String uri = BitcoinURI.convertToBitcoinURI(address, | |
output.getValue(), | |
"very currency", | |
"such profit"); |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"math" | |
"code.google.com/p/go.crypto/scrypt" | |
) | |
func main() { |
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
package secp256k1 | |
/* | |
#include "./secp256k1/include/secp256k1.h" | |
*/ | |
import "C" | |
import () |
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
{ | |
"Crypto": { | |
"cipher": "aes-128-cbc", | |
"cipherparams": { | |
"iv": "6e38e8499d80916a6767a0c1c70a8cc8" | |
}, | |
"ciphertext": "6984bc36d8e3e1d9048ee2f2a05be092ca690de8b487fcb0f3b166900b3d960a71cd752f39af26c6cb5db8ca06a524a3", | |
"kdf": "scrypt", | |
"kdfparams": { | |
"dklen": 32, |
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
18:14:50 (master) ~/go/src/github.com/Gustav-Simonsson/go-opencl/cl | |
> go build -v -x | |
WORK=/tmp/go-build843416135 | |
github.com/Gustav-Simonsson/go-opencl/cl | |
mkdir -p $WORK/github.com/Gustav-Simonsson/go-opencl/cl/_obj/ | |
mkdir -p $WORK/github.com/Gustav-Simonsson/go-opencl/ | |
cd /home/gs/go/src/github.com/Gustav-Simonsson/go-opencl/cl | |
CGO_LDFLAGS="-g" "-O2" /home/gs/golang/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/Gustav-Simonsson/go-opencl/cl/_obj/ -- -I $WORK/github.com/Gustav-Simonsson/go-opencl/cl/_obj/ -I/opt/opencl-headers/include cl.go context.go device.go kernel.go platform.go program.go queue.go types.go | |
/home/gs/golang/pkg/tool/linux_amd64/6c -F -V -w -trimpath $WORK -I $WORK/github.com/Gustav-Simonsson/go-opencl/cl/_obj/ -I /home/gs/golang/pkg/linux_amd64 -o $WORK/github.com/Gustav-Simonsson/go-opencl/cl/_obj/_cgo_defun.6 -D GOOS_linux -D GOARCH_amd64 $WORK/github.com/Gustav-Simonsson/go-opencl/cl/_obj/_cgo_defun.c | |
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -print-libgcc-file-name |