Skip to content

Instantly share code, notes, and snippets.

apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
@dbwest
dbwest / cant_import.json
Last active June 24, 2018 21:57
JSON I can't import into Elasticsearch
{"index":{"_id":"aa9e82d7-0d17-4216-ba74-e753d16ca9bc"}}
{"market":{"id":"0x","name":"0x","symbol":"ZRX","rank":"47","price_usd":"0.866996","price_btc":"0.00008817","24h_volume_usd":"9319700.0","market_cap_usd":"444241833.0","available_supply":"512392021.0","total_supply":"1000000000","max_supply":null,"percent_change_1h":"-0.07","percent_change_24h":"-11.03","percent_change_7d":"-18.11","last_updated":"1519311553","internal_id":"0x","cmc_id":"0x","price_eth":0.0010753465434953,"market_percent":0.0010388068872023,"first_trade_time":1502892561,"first_price_usd":0.111725,"avg_3mo_volume":20927598.619727,"avg_3mo_mkt_cap":487394441.7039,"growth_all_time":7.8062295815619,"volume_change_24h":-21730,"mkt_cap_percent_change_24h":0.0010344518726417,"mkt_cap_against_total_market_growth":0.048752950800101,"price_change_btc_24h":-3.1220000000001e-7,"price_change_eth_24h":4.0867274234352e-6,"percent_change_1mo":-81.019112516067,"proof_type":"N\/A","algorithm":"N\/A"},"topCoinByAllTimeGrowth":0,"categories":["Exchange","G
@dbwest
dbwest / working_bulk_import_data.json
Last active June 24, 2018 21:56
Some bulk import data into Elasticsearch that works
{"index":{"_id":"ab1d0210-2425-4798-8eac-acab1e27e750"}}
{"market":{"id":"russiacoin","name":"RussiaCoin","symbol":"RC","rank":"968","price_usd":"0.985482","price_btc":"0.00010022","24h_volume_usd":"242.863","market_cap_usd":"8256243.0","available_supply":"8377873.0","total_supply":"8377873.0","max_supply":null,"percent_change_1h":"-0.7","percent_change_24h":"-7.66","percent_change_7d":"-21.69","last_updated":"1519311547","internal_id":"russiacoin","cmc_id":"russiacoin","price_eth":0.0012223062878916,"market_percent":1.9306245953689e-5},"topCoinByAllTimeGrowth":0}
@dbwest
dbwest / default.nix
Created June 2, 2018 05:23
default.nix for ruby development
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
ruby = pkgs.ruby;
rubygems = (pkgs.rubygems.override { ruby = ruby; });
in stdenv.mkDerivation rec {
name = "cryptocrunch";
buildInputs = [
Thu Mar 8 20:42:43 UTC 2018
@dbwest
dbwest / february11-paircolumbus.md
Created February 11, 2017 16:43 — forked from jaybobo/iluvsql-paircolumbus.md
February 11th - Pair Columbus - ILUVSQL
description "appium server"
author "startup script: kvz - http://kevin.vanzonneveld.net"
# used to be: start on startup
# until we found some mounts weren't ready yet while booting:
start on started mountall
stop on shutdown
# Automatically Respawn:
respawn
@dbwest
dbwest / Gemfile
Last active December 23, 2015 00:09
An example script, and accompanying Gemfile, to use for automating the Chrome mobile browser on an Android device. Tested on OS X Mountain Lion. Appium installed using node for CLI. If you don't have a fast android emulator, try genymotion...
source "http://rubygems.org"
gem 'watir-webdriver'
gem 'selenium-webdriver'
#in rails proj dir
$ bundle update
Resolving dependencies...
Using rake (0.9.6)
Using RedCloth (4.2.9)
Using i18n (0.6.4)
Using multi_json (1.3.7)
Using activesupport (3.2.8)
Using builder (3.0.4)
Using activemodel (3.2.8)
@dbwest
dbwest / Gemfile
Created May 28, 2012 16:36
haml rails error after 'rake erb:to:haml'
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'bcrypt-ruby'
# gem 'disguise'