Skip to content

Instantly share code, notes, and snippets.

@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 / 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalitun
dalitun / github_repo.py
Created July 7, 2017 14:13 — forked from toast38coza/github_repo.py
An Ansible module for managing github repos
#!/usr/bin/python
DOCUMENTATION = '''
---
module: github_repo
short_description: Manage your repos on Github
'''
EXAMPLES = '''
- name: Create a github Repo
@dalitun
dalitun / github_repo.py
Created July 7, 2017 14:13 — forked from toast38coza/github_repo.py
An Ansible module for managing github repos
#!/usr/bin/python
DOCUMENTATION = '''
---
module: github_repo
short_description: Manage your repos on Github
'''
EXAMPLES = '''
- name: Create a github Repo
@dalitun
dalitun / ansible-bootstrap-ubuntu-16.04.yml
Created July 7, 2017 14:39 — forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@dalitun
dalitun / golang-fr.md
Created October 25, 2017 18:33 — forked from leg0ffant/golang-fr.md
Golang introduction [FR]

Cours langage GO - annotation - Anthony Le Goff


#INTRO ALGORITHME SOUS GO De l'écriture du premier programme à la logique informatique golang

http://golang.org

Premier programme et présentation de "hello world"

@dalitun
dalitun / answer_pic.go
Created December 22, 2017 18:43 — forked from tetsuok/answer_pic.go
An answer of the exercise: Slices on a tour of Go
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
// Allocate two-dimensioanl array.
a := make([][]uint8, dy)
for i := 0; i < dy; i++ {
a[i] = make([]uint8, dx)
}
@dalitun
dalitun / populate.go
Created December 29, 2017 17:10 — forked from andrielfn/populate.go
Script to populate MySQL databases up to the *size-limit*. OS X binary download: https://www.dropbox.com/s/2gecxhqkxa7wpmq/bombsql?dl=0.
package main
import (
"database/sql"
"fmt"
"log"
"os"
"strconv"
_ "github.com/go-sql-driver/mysql"
@dalitun
dalitun / ssh.go
Created December 29, 2017 17:11 — forked from andrielfn/ssh.go
Go lang SSH connection
package main
import (
"bytes"
"code.google.com/p/go.crypto/ssh"
"fmt"
"io/ioutil"
"os"
)