Skip to content

Instantly share code, notes, and snippets.

@parrondo
parrondo / remgit.sh
Created December 26, 2017 17:13 — forked from ckalima/remgit.sh
Shell Script to Create a Remote Git Repository
# remgit.sh
# Creates a remote git repository from the current local directory
# Configuration
# Replace SSH_USERNAME, SSH_HOST, SSH_GIT_PATH with your details
USER=SSH_USERNAME
HOST=SSH_HOST
GIT_PATH=SSH_GIT_PATH
REPO=${PWD##*/}
@parrondo
parrondo / anaconda-keras-tensorflow.txt
Last active March 7, 2018 03:10 — forked from jeffgreenca/anaconda-tensorflow-keras.txt
Anaconda Keras / TensorFlow environment setup
Install TensorFlow (CPU), Keras, and some other tools to a new linux anaconda environment.
Open Anaconda Prompt
$ conda create --name keras35 python=3.5
$ source activate keras35
(keras35)$ # Your prompt should change
(keras35)$ conda install jupyter
(keras35)$ conda install scipy
(keras35)$ conda install spyder
@parrondo
parrondo / home-directory-backup
Created April 11, 2017 17:50 — forked from wrouesnel/home-directory-backup
A script for doing routine backups of one's home directory with bup and ZFS
#!/bin/bash
# Script to do sensible home directory backups. Expects to receive the
# target user as it's first argument, and then proceeds to do a home
# directory backup in a ZFS-aware way. The second arg should be the name
# for the backup. hostname is used if it's blank.
# The ZFS backup is done by snapshotting every file system underneath the
# home directory and then indexing them all with appropriate graft options.
# The backup destination is determined by the user-name, and expects to find
#!/bin/bash
cd ~/.bup && {
git for-each-ref refs/heads/ --shell --format '
echo -n %(refname)...
commit=$(echo empty | git commit-tree `git mktree < /dev/null`)
for i in `git rev-list --since="2 week ago" --date-order --reverse %(refname)`; do
commit=$(git log -1 --pretty=format:%%B $i | GIT_AUTHOR_NAME=`git log -1 --pretty=format:%%an $i` \
GIT_AUTHOR_EMAIL=`git log -1 --pretty=format:%%aE $i` \
@parrondo
parrondo / backup.bup
Created April 10, 2017 09:59 — forked from jasontbradshaw/backup.bup
A backup script using bup.
#!/usr/bin/env bash
# Strict mode (see: http://redsymbol.net/articles/unofficial-bash-strict-mode/).
set -euo pipefail
IFS=$'\n\t'
# We name the repository directory after the system's hostname and the current
# year/month. We include the year/month combo so our backup repository doesn't
# continue to grow forever, and we can manually delete old ones as necessary.
name="$(hostname)"
@parrondo
parrondo / .remote-backup-excludes.txt
Created April 2, 2017 11:42 — forked from wrouesnel/.remote-backup-excludes.txt
A script for performing a remote backup to another server using rsync and bup for versioning.
# this is an rsync-excludes format list of files to exclude.
@parrondo
parrondo / centos_python_dev_env_setup
Created August 16, 2016 11:39 — forked from ygorth/centos_python_dev_env_setup
CentOS 7: Install Python 3.5.1, pip, virtualenv, and virtualenvwrapper
#!/bin/bash
#####################################################################
## IMPORTANT ##
# Run this script with root (sudo su -), wont work if run as sudo.
# Change the variables as needed.
######################################################################
USER=root # User that will have ownership (chown) to /usr/local/bin and /usr/local/lib
USERHOME=/${USER} # The path to the users home, in this case /home/youruser
PYSHORT=3.5 # The Python short version, e.g. easy_install-${PYSHORT} = easy_install-3.5
PYTHONVER=3.5.2 # The actual version of python that you want to download from python.org
@parrondo
parrondo / dukas_download.rb
Last active September 10, 2015 20:44 — forked from thisredone/dukas_download.rb
Downloads tick data from dukascopy
require 'typhoeus'
require 'pry'
$currencies = {
"AUDJPY" => 1175270400, # starting from 2007.03.30 16:00
"AUDNZD" => 1229961600, # starting from 2008.12.22 16:00
"AUDUSD" => 1175270400, # starting from 2007.03.30 16:00
"CADJPY" => 1175270400, # starting from 2007.03.30 16:00
"CHFJPY" => 1175270400, # starting from 2007.03.30 16:00
"EURAUD" => 1175270400, # starting from 2007.03.30 16:00