This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 | |
disable root login: https://askubuntu.com/questions/27559/how-do-i-disable-remote-ssh-login-as-root-from-a-server | |
setup remote postgres login (yes, I used a strong, randomly generated password): | |
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands | |
https://bosnadev.com/2015/12/15/allow-remote-connections-postgresql-database-server/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download chrome manually | |
# java (using default-jdk gave SSL errors with gradle https://askubuntu.com/questions/971059/17-10-openjdk-and-oracle-jdk-8-and-9-the-trustanchors-parameter-must-be-non-empt) | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# download and install intellij manually | |
# fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WhatCouldGoWrong<T, U> { | |
T t; | |
U u; | |
public void set(T t) { | |
this.t = t; | |
} | |
public void set(U u) { | |
this.u = u; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example output from running scripts in https://github.com/fearofcode/nyc-taxi-data follows. | |
base script, 2tb HDD, vanilla postgres settings fresh from ubuntu install. 4 CPUs, 8 GB VM RAM. ubuntu 16.04, postgres 10. | |
sedding a 14 million line CSV and then COPYing it in: | |
Thu Dec 21 23:30:18 PST 2017: beginning load for data/yellow_tripdata_2009-01.csv | |
COPY 14092413 | |
Thu Dec 21 23:34:57 PST 2017: finished raw load for data/yellow_tripdata_2009-01.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@::,:;# | |
@+'#@@@@@#' | |
###@@@@###@+++ | |
##@@@@@@@@#@@@@;# | |
++@@@#@@@@@@@@@@@'# | |
'#@+#'@@@@@@@@@@@@@+ | |
#@+'+'@#@#@+#@@@@@@#+@ | |
#@+++'+@@@@@@@@@@@@@'@ | |
@@@@@:####@@@@@@@@@@@'@ | |
@@@@@#+';'##@@@@@@@@@@@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: lc gmmc | |
CC=gcc | |
CFLAGS= -g -m64 -O3 -std=gnu11 -Wall -Werror -Wextra -Wshadow -pedantic \ | |
-Wextra -Wunknown-pragmas -Wfloat-equal -Wcast-qual | |
LDLIBS= -lgsl -lgslcblas -lm | |
lc: learning_c.c | |
$(CC) $(CFLAGS) -o $@ learning_c.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: golden_monkey_monte_carlo.c | |
gcc -m64 -O3 -std=c99 -Wall -Werror -Wextra -Wshadow -pedantic \ | |
-Wextra -Wunknown-pragmas -Wfloat-equal -Wcast-qual \ | |
-o gmmc golden_monkey_monte_carlo.c \ | |
-lgsl -lgslcblas -lm | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.thoughtworks.com/insights/blog/implementing-blue-green-deployments-aws | |
http://docs.ansible.com/haproxy_module.html | |
http://martinfowler.com/bliki/BlueGreenDeployment.html | |
https://spring.io/blog/2014/04/04/project-sagan-zero-downtime-deployments | |
https://github.com/melix/greenblueboot | |
https://theholyjava.wordpress.com/2013/09/05/blue-green-deployment-without-breaking-sessions-with-haproxy-and-jetty/ | |
https://codeascraft.com/2013/07/01/atomic-deploys-at-etsy/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.wkh.learningelasticsearch; | |
import org.elasticsearch.action.index.IndexResponse; | |
import org.elasticsearch.action.search.SearchResponse; | |
import org.elasticsearch.client.Client; | |
import org.elasticsearch.index.query.QueryBuilders; | |
import org.elasticsearch.node.Node; | |
import org.elasticsearch.search.SearchHit; | |
import org.elasticsearch.search.SearchHits; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* exercises, chapter 3, section 1 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <limits.h> | |
#include <float.h> | |
#include <math.h> | |
#include <gsl/gsl_math.h> | |
#include <gsl/gsl_rng.h> |