Skip to content

Instantly share code, notes, and snippets.

View Haehnchen's full-sized avatar

Daniel Espendiller Haehnchen

View GitHub Profile
var c = module.exports = {}
c.symbols = []
// bitfinex
let x = [
'BTCUSD', 'EOSUSD', 'LTCUSD', 'ETHUSD', 'ETCUSD', 'NEOUSD', 'IOTUSD', 'XMRUSD', 'XRPUSD', 'DSHUSD', 'ZECUSD', 'OMGUSD', 'ETPUSD', 'BABUSD', 'BSVUSD',
'EOSBTC', 'LTCBTC', 'ETHBTC', 'ETCBTC', 'NEOBTC', 'IOTBTC', 'XMRBTC', 'XRPBTC', 'DSHBTC', 'ZECBTC', 'OMGBTC', 'ETPBTC',
]
@Haehnchen
Haehnchen / decrypt.java
Created May 14, 2017 15:43
PHP encrypt and JAVA decrypt with openssl and AES-128-CBC
public static String decrypt(@NotNull String input, @NotNull String key){
byte[] bytes = Base64.decodeBase64(input);
if(bytes.length < 17) {
return null;
}
byte[] ivBytes = Arrays.copyOfRange(bytes, 0, 16);
byte[] contentBytes = Arrays.copyOfRange(bytes, 16, bytes.length);
{
"registrar": [
{
"provider": "class",
"language": "php",
"signatures": [
{
"class": "FooClass",
"method": "foo",
"type": "type"
@Haehnchen
Haehnchen / enum-bistmask.php
Last active February 8, 2017 10:05
Enum handling for PHP and Doctrine Models
<?php
class EnumBitmask {
private $set_func;
private $get_func;
public function __construct(callable $set_func, callable $get_func) {
$this->set_func = $set_func;
$this->get_func = $get_func;
@Haehnchen
Haehnchen / git-mv-with-history
Created February 5, 2016 09:22 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@Haehnchen
Haehnchen / my_build.sh
Created November 30, 2011 18:12 — forked from chikuzen/my_build.sh
How to compile libav/x264cli on windows
#!/bin/bash
# CAUTION!!! THIS SCRIPT IS NO WARRANTY!!!
: << _COMMENT_
How to compile libav/x264 binaries for both 32bit and 64bit on Windows
At first, you should install Git into your Windows.
1. Download Git from
http://msysgit.googlecode.com/files/Git-1.7.6-preview20110708.exe