Skip to content

Instantly share code, notes, and snippets.

View ArneGockeln's full-sized avatar
🏠
Working from home

Arne Gockeln ArneGockeln

🏠
Working from home
View GitHub Profile
@ArneGockeln
ArneGockeln / gist:504624275142b78082487867f73d047d
Created January 20, 2022 12:44
add git alias for pretty log printing
# add an alias for the command
$ git config --global alias.logpretty 'log --pretty=format:"%ad %h: %s" --date=short'
# retrieve log history
$ git logpretty
2022-01-20 4d7ce7de: fix: perf bmrk chart dark mode annotation hover color
2022-01-20 15f6b240: fix: fund style name in perf bmrk list+chart
2022-01-20 5643fdf7: fix: change font weight to 300
2022-01-19 12444d96: fix: cleanup debug output
[...]
@ArneGockeln
ArneGockeln / gist:1eb2b01bb6741033ed437714d1b6d230
Created April 5, 2021 17:27
macos dylib cannot be opened because the developer cannot be verified
```sudo spctl --master-disable``` to allow apps downloaded from Anywhere
@ArneGockeln
ArneGockeln / fxcm.sh
Last active December 1, 2018 23:57
FXCM Tickdata Download with CLI
#!/bin/bash
#author: Arne Gockeln, https://www.arnegockeln.com
#description: This scripts downloads, extracts, converts, concatenates and processes tick data of FXCM public repository.
# It is tested on macOS Mojave. You need to install dos2unix! like brew install dos2unix.
#
# Usage: ./fxcm.sh SYMBOL YEAR STARTWEEK ENDWEEK
#
# Example: Download week 1-4 of 2018 of EURUSD. Output will be saved to EURUSD-2018-1-4.csv
#
# $ ./fxcm.sh EURUSD 2018 1 4
@ArneGockeln
ArneGockeln / in_array_multi.php
Created October 1, 2018 14:16
php recursive array search for needle. returns path of keys to value or false
<?php
// This function searches for needle inside of multidimensional array haystack
// Returns the path to the found element or false
function in_array_multi( $needle, array $haystack ) {
if ( ! is_array( $haystack ) ) return false;
foreach ( $haystack as $key => $value ) {
if ( $value == $needle ) {
return $key;
} else if ( is_array( $value ) ) {
@ArneGockeln
ArneGockeln / xcode-developer-tools.md
Created September 5, 2018 15:21
xcode macos developer tools path
@ArneGockeln
ArneGockeln / iptables.minimal
Last active September 4, 2018 14:50
minimum ip(6)tables rules. it allows ssh, prevents ssh bruteforce and icmpflood
*filter
#
# Base policy
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
#
# Don't attempt to firewall internal traffic on the loopback device.
-A INPUT -i lo -j ACCEPT
#
@ArneGockeln
ArneGockeln / tickdatadl.sh
Last active August 16, 2018 12:45
Download weekly tickdata per symbol from FXCM public servers, extract and convert to unix file
#!/bin/bash
## tick data download from fxcm public api
#title :tickdatadl
#description :tick data download per week from fxcm public api
#author :Arne Gockeln <[email protected]>
#version :0.1
#notes :requires tr and dos2unix
#=================================================================================
@ArneGockeln
ArneGockeln / tarfolders.sh
Created June 19, 2018 09:57
Create tar.gz archives inside _backup directory for all directories in path
# create folder _backup inside search path if it does not exist
mkdir -p _backup
# this finds all directories inside . excluding _backup and executes tar cvzf command.
# it creates a tar archive inside _backup folder with the name <foldername>.tar.gz
find . -mindepth 1 -maxdepth 1 -type d -not -path "./_backup" -exec tar cvzf _backup/{}.tar.gz {} \;
@ArneGockeln
ArneGockeln / convert.sh
Created May 16, 2018 20:54
This bash scripts removes nullbytes and dos special characters from fxcm csv files. Requires tr and dos2unix.
#!/bin/bash
#title :convert
#description :removes nullbytes and dos special characters from fxcm csv files
#author :Arne Gockeln, www.arnegockeln.com
#version :0.1
#notes :requires tr and dos2unix
#=================================================================================
if [ $# -lt 1 ]; then
echo "This script removes nullbytes and dos special characters from fxcm csv files"