Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalitun
dalitun / cryptotrade.py
Created June 10, 2017 17:54 — forked from priestc/cryptotrade.py
Automatically trade cryptocurrencies
from moneywagon import get_current_price, get_address_balance
from moneywagon.tx import Transaction
from bitcoin import privkey_to_address
data = [
['btc', 'KwsccfDeJkrW6ZgMH6AJ7apNGncMVEagNWhTwq9MJnqoKp58i1MG'],
['ltc', 'T3ht4QWpi8q6sQKDpj7AKwMkDeFfZKbaBibiodmtsm1xqhcTJZT1']
]
## DETERMINE IF TRADE IS NEEDED
@dalitun
dalitun / NOTES.md
Created June 2, 2017 14:08 — forked from DenisIzmaylov/NOTES.md
Step By Step Guide to Configure a CoreOS Cluster From Scratch

Step By Step Guide to Configure a CoreOS Cluster From Scratch

This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.

Content

@dalitun
dalitun / docker-compose.yml
Created May 22, 2017 16:01 — forked from JohannesRudolph/docker-compose.yml
Concourse on Docker with Let's Encrypt
## NOTE:
## because this docker-compose.yml is designed to work with a remote docker-machine,
## all mounted volume paths are currently relative to /concourse-data, data is thus stored on the docker host
nginx:
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
@dalitun
dalitun / install-python.sh
Last active May 16, 2017 12:34 — forked from osterman/install-python.sh
Install Python on CoreOS
#!/bin/bash -uxe
VERSION=2.7.13.2713
PACKAGE=ActivePython-${VERSION}-linux-x86_64-glibc-2.3.6-401785
# make directory
mkdir -p /opt/bin
cd /opt
wget http://downloads.activestate.com/ActivePython/releases/${VERSION}/${PACKAGE}.tar.gz
@dalitun
dalitun / painless_q.py
Created March 29, 2017 13:11 — forked from kastnerkyle/painless_q.py
Painless Q-Learning Tutorial implementation in Python http://mnemstudio.org/path-finding-q-learning-tutorial.htm
# Author: Kyle Kastner
# License: BSD 3-Clause
# Implementing http://mnemstudio.org/path-finding-q-learning-tutorial.htm
# Q-learning formula from http://sarvagyavaish.github.io/FlappyBirdRL/
# Visualization based on code from Gael Varoquaux [email protected]
# http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
@dalitun
dalitun / Create-Jenkins-Master-On-Windows-Server-Core.ps1
Created March 10, 2017 14:08 — forked from PlagueHO/Create-Jenkins-Master-On-Windows-Server-Core.ps1
Create a Jenkins Master on a Windows Server 2012 R2 Core install
# Configure the settings to use to setup this Jenkins Executor
$Port = 80
$IPAddress = '192.168.1.96'
$SubnetPrefixLength = 24
$DNSServers = @('192.168.1.1')
$DefaultGateway = '192.168.1.1'
# Install .NET Framework 3.5
Install-WindowsFeature -Name NET-Framework-Core
@dalitun
dalitun / spec_helper.rb
Created March 9, 2017 11:21 — forked from pda/spec_helper.rb
Fast RSpec with a tiered environment: SPEC=(unit|model|full) rspec …
mode = ENV["SPEC"] || "full"
require_relative "spec_helper_#{mode}"
@dalitun
dalitun / neutron-port-state-change.py
Created February 22, 2017 10:58 — forked from upa/neutron-port-state-change.py
Change port stauts via neutron api using neutron-python binding
#!/usr/bin/env python
import sys
import json
from neutronclient.v2_0 import client as neutronclient
authurl = 'http://10.0.2.15:5000/v2.0'
username = 'demo'
password = 'pass'
tenantname = 'demo'
#!/bin/bash
# note: this script is invoked automatically by rackspace-flasky.py
# save command line arguments
GMAIL_USERNAME=$1
GMAIL_PASSWORD=$2
# install web server dependencies
apt-get update
apt-get -y install python python-virtualenv nginx supervisor git