Skip to content

Instantly share code, notes, and snippets.

View tygern's full-sized avatar

Tyson Gern tygern

View GitHub Profile
@tygern
tygern / .env
Created November 18, 2016 17:02
sample ribbon configuration
export EUREKA_CLIENT_ENABLED=false
export RIBBON_EUREKA_ENABLED=false
export TODO_APP_RIBBON_LISTOFSERVERS=http://localhost:8080
export TASK_SERVICE_RIBBON_LISTOFSERVERS=http://localhost:8081
export NOTIFICATION_SERVICE_RIBBON_LISTOFSERVERS=http://localhost:8082
@tygern
tygern / build.gradle
Last active November 18, 2016 19:41
security dependencies
buildscript {
repositories { mavenCentral() }
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE"
}
}
apply plugin: "java"
apply plugin: "spring-boot"
@tygern
tygern / SecurityConfig.java
Created November 18, 2016 19:10
security config
package tips.cloudnative.security;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
@EnableOAuth2Sso
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@tygern
tygern / build.gradle
Last active November 18, 2016 19:41
security dependencies with configuration
buildscript {
repositories { mavenCentral() }
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE"
}
}
apply plugin: "java"
apply plugin: "spring-boot"
@tygern
tygern / setup.md
Last active September 18, 2025 14:12
Machine setup
  1. Sign in to work account
  2. Sign in to icloud account
  3. Remove icons from dock
  4. Auto hide dock
  5. Show sound, displays, and bluetooth in the menubar
  6. Disable system sounds
  7. Set keyboard to use F-keys, hide the keyboard selector
  8. Increase key repeat speed and decrease delay
  9. Remove Cmd-Shift-A and Cmd-Shift-M shortcuts
  10. Remove hot corners
@tygern
tygern / sendToTracker.js
Last active March 15, 2017 21:25
Google feedback form to Pivotal Tracker
function sentToTracker() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Form Responses 1");
var lastRow = sheet.getLastRow();
var feedback = feedbackFromRow(sheet, lastRow);
createStory(feedback, "1990653", "6b99e32f7dbf9a37317171b28c48b1d6");
}
function feedbackFromRow(sheet, row) {
return {
datasource.url=jdbc:mysql://localhost:3306/pickles_dev
datasource.username=pickles
pickles.url=http://localhost:8081
export DATASOURCE_URL=jdbc:mysql://localhost:3306/pickles_dev
export DATASOURCE_USER=pickles
export PICKLES_URL=http://localhost:8081
./gradlew start
export DATASOURCE_URL=jdbc:mysql://localhost:3306/pickles_test
export DATASOURCE_USER=tester
export PICKLES_URL=http://localhost:7071
./gradlew test
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",