Skip to content

Instantly share code, notes, and snippets.

View wingyplus's full-sized avatar
😶‍🌫️
Burned out

Thanabodee Charoenpiriyakij wingyplus

😶‍🌫️
Burned out
View GitHub Profile
import jenkins.model.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
domain = Domain.global()
store = Jenkins.instance.getExtensionList('com.cloudbees.plugins.credentials.SystemCredentialsProvider')[0].getStore()
@wingyplus
wingyplus / isexist_vs_isnotexist.go
Created February 11, 2016 07:00 — forked from mastef/isexist_vs_isnotexist.go
os.IsExist(err) vs os.IsNotExist(err)
/*
Watch out, os.IsExist(err) != !os.IsNotExist(err)
They are error checkers, so use them only when err != nil, and you want to handle
specific errors in a different way!
Their main purpose is to wrap around OS error messages for you, so you don't have to test
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and
"file does not exist/directory does not exist"

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
package th.co.osdev.alfresco.filemigration.dao;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import java.util.Date;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@wingyplus
wingyplus / build.gradle
Created March 9, 2012 03:54 — forked from sammyrulez/build.gradle
Grails 2.0 gradle build
grailsVersion = '2.0.0'
buildscript {
repositories {
mavenCentral()
mavenRepo urls: 'http://snapshots.repository.codehaus.org'
mavenRepo urls: 'http://download.java.net/maven/2/'
mavenRepo name: "Grails Repo", urls: "http://repo.grails.org/grails/repo"
}