Skip to content

Instantly share code, notes, and snippets.

View tygern's full-sized avatar

Tyson Gern tygern

View GitHub Profile
### Keybase proof
I hereby claim:
* I am tygern on github.
* I am tysongern (https://keybase.io/tysongern) on keybase.
* I have a public key ASCv4NLq74Rd1T6mlpKoA1lEI4iTTGvWxA8WxiKkllFmVgo
To claim this, I am signing this object:
@tygern
tygern / digital-ocean-machine.sh
Last active May 6, 2020 14:10
Docker machine on Digital Ocean
# Install docker-machine
curl -L https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-$(uname -s)-$(uname -m) > ~/bin/docker-machine
chmod +x ~/bin/docker-machine
# Install doctl
curl -sL https://github.com/digitalocean/doctl/releases/download/v1.41.0/doctl-1.41.0-darwin-amd64.tar.gz | tar -xzv
chmod +x doctl
mv doctl ~/bin
# Create docker machine
@tygern
tygern / install.sh
Last active June 23, 2019 17:01
ubuntu setup
sudo apt install curl
curl -s https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update
sudo apt purge ubuntu-web-launchers
sudo apt install gnome-session gnome-sushi git openjdk-11-jdk network-manager-openvpn-gnome gnome-tweak-tool chrome-gnome-shell xsel gnome-weather tree htop sysfsutils signal-desktop ubuntu-restricted-extras jq certbot mariadb-server python3.7 python3-pip
sudo update-java-alternatives --set /usr/lib/jvm/java-1.11.0-openjdk-amd64
@tygern
tygern / build.gradle
Created August 7, 2017 20:23
subproject build file
dependencies {
compile "org.springframework:spring-jdbc:$springVersion"
compile "org.springframework:spring-web:$springVersion"
}
@tygern
tygern / bulid.gradle
Last active August 7, 2017 20:41
spring version variables
buildscript {
ext {
springBootVersion = "1.5.3.RELEASE"
springVersion = "4.3.8.RELEASE"
mysqlVersion = "6.0.6"
springCloudVersion = "1.2.1.RELEASE"
springCloudDependenciesVersion = "Camden.SR6"
springCloudServicesVersion = "1.3.1.RELEASE"
}
// ...
dev.datasource.password=super-secret
test.datasource.password=also-secret
def localProperties = new Properties()
localProperties.load(project.rootProject.file("local.properties").newDataInputStream())
start.environment([
"DATASOURCE_URL": "jdbc:mysql://localhost:3306/pickles_dev",
"DATASOURCE_USER": "pickles",
"DATASOURCE_PASSWORD": localProperties.getProperty("dev.datasource.password"),
"PICKLES_URL": "http://localhost:8081",
])
start.environment([
"DATASOURCE_URL": "jdbc:mysql://localhost:3306/pickles_dev",
"DATASOURCE_USER": "pickles",
"DATASOURCE_PASSWORD": System.getenv("DEV_DATASOURCE_PASSWORD"),
"PICKLES_URL": "http://localhost:8081",
])
test.environment([
"DATASOURCE_URL": "jdbc:mysql://localhost:3306/pickles_test",
"DATASOURCE_USER": "tester",
start.environment([
"DATASOURCE_URL": "jdbc:mysql://localhost:3306/pickles_dev",
"DATASOURCE_USER": "pickles",
"PICKLES_URL": "http://localhost:8081",
])
test.environment([
"DATASOURCE_URL": "jdbc:mysql://localhost:3306/pickles_test",
"DATASOURCE_USER": "tester",
"PICKLES_URL": "http://localhost:7071",
export DATASOURCE_URL=jdbc:mysql://localhost:3306/pickles_test
export DATASOURCE_USER=tester
export PICKLES_URL=http://localhost:7071
./gradlew test