Skip to content

Instantly share code, notes, and snippets.

View tygern's full-sized avatar

Tyson Gern tygern

View GitHub Profile
export DATASOURCE_URL=jdbc:mysql://localhost:3306/pickles_dev
export DATASOURCE_USER=pickles
export PICKLES_URL=http://localhost:8081
./gradlew start
datasource.url=jdbc:mysql://localhost:3306/pickles_dev
datasource.username=pickles
pickles.url=http://localhost:8081
@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 {
@tygern
tygern / setup.md
Last active May 19, 2025 17:49
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 / 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 / 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
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 / .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 / safeProvide.ts
Created August 19, 2016 20:06
Typesafe providers for Angular 2
export class SafeToken<T> {
constructor(private name: string){}
toString() {
return `Token ${this.name}`
}
}
export function safeProvide<T>(token:SafeToken<T>) {
@tygern
tygern / messageConsumer.spec.js
Created February 23, 2016 22:33
MessageConsumer spec with Subject
describe('MessageConsumer', function () {
var subject;
beforeEach(function () {
subject = new Rx.Subject();
var provider = new MessageProvider();
spyOn(provider, 'getMessage').and.returnValue(source.asObservable())
consumer = new MessageConsumer(provider);