Skip to content

Instantly share code, notes, and snippets.

View jahe's full-sized avatar

Jannik Hell jahe

View GitHub Profile
@jahe
jahe / fizzbuzz.js
Created May 1, 2015 07:45
fizzbuzz function with 69 characters
function fizzbuzz(n){return((!(n%3)?'Fizz':'')+(!(n%5)?'Buzz':''))||n;}
@jahe
jahe / wildfly-maven-cheatsheet.sh
Last active August 29, 2015 14:20
Wildfly Installation with Maven Cheatsheet
# Install WildFly 8.2.0 Final to /usr/local/opt/wildfly-as/libexec
brew install wildfly-as
# Add environment variables to ~/.bash_profile
export JBOSS_HOME=/usr/local/opt/wildfly-as/libexec
export PATH=${PATH}:${JBOSS_HOME}/bin
# Start WildFly on Port 8080 and 9990
standalone.sh
@jahe
jahe / liquibase-cheatsheet.xml
Last active August 29, 2015 14:23
Liquibase Cheatsheet
// Precondition to execute a changelog
<preConditions onFail="MARK_RAN">
<changeSetExecuted id="1" author="peter" changeLogFile="details/dbchangelog-01.00.00.00.xml"/>
<columnExists tableName="user" columnName="username" />
</preConditions>
// Precondition to execute a changelog when the specific changelog hasn't been executed yet
<preConditions onFail="MARK_RAN">
<not>
<changeSetExecuted id="1" author="peter" changeLogFile="details/dbchangelog-01.00.00.00.xml"/>
@jahe
jahe / sencha-cmd-cheatsheet.sh
Created June 15, 2015 19:59
Sencha Cmd Cheatsheet
# Check for Sencha Cmd Updates
sencha upgrade --check
# Update Sencha Cmd to the latest version
sencha upgrade
@jahe
jahe / celebrate-pride.js
Last active August 29, 2015 14:23
Celebrate Pride Bookmarklet
javascript:(function(){var a='.celebrate-pride{position: fixed;z-index: 0;width: 100%;height: 100vh;background:-moz-linear-gradient(top,#ff3e18 0,#ff3e18 16%,#fc9a00 16%,#fc9a00 33%,#ffd800 33%,#ffd800 49%,#39ea7c 49%,#39ea7c 66%,#39ea7c 66%,#0bb2ff 66%,#0bb2ff 83%,#985aff 83%,#985aff 100%)!important;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ff3e18),color-stop(16%,#ff3e18),color-stop(16%,#fc9a00),color-stop(33%,#fc9a00),color-stop(33%,#ffd800),color-stop(49%,#ffd800),color-stop(49%,#39ea7c),color-stop(66%,#39ea7c),color-stop(66%,#39ea7c),color-stop(66%,#0bb2ff),color-stop(83%,#0bb2ff),color-stop(83%,#985aff),color-stop(100%,#985aff))!important;background:-webkit-linear-gradient(top,#ff3e18 0,#ff3e18 16%,#fc9a00 16%,#fc9a00 33%,#ffd800 33%,#ffd800 49%,#39ea7c 49%,#39ea7c 66%,#39ea7c 66%,#0bb2ff 66%,#0bb2ff 83%,#985aff 83%,#985aff 100%)!important;background:-o-linear-gradient(top,#ff3e18 0,#ff3e18 16%,#fc9a00 16%,#fc9a00 33%,#ffd800 33%,#ffd800 49%,#39ea7c 49%,#39ea7c 66%,#39ea7c 66%
@jahe
jahe / osx-shell-cheatsheet.sh
Created September 1, 2015 20:53
OSX Shell Cheatsheet
// Open a file with the default App for this kind of filetype
open README.txt
@jahe
jahe / transact-sql-cheatsheet.sql
Created September 2, 2015 10:15
Transact-SQL Cheatsheet
-- Start Transaction update a row and rollback transaction
BEGIN TRANSACTION
UPDATE user SET username='peter' WHERE id=2
ROLLBACK TRANSACTION
-- Start Transaction update a row and commit transaction
BEGIN TRANSACTION
UPDATE user SET username='peter' WHERE id=2
COMMIT TRANSACTION
@jahe
jahe / vagrant-cheatsheet.rb
Last active January 31, 2016 21:52
Vagrant Cheatsheet
# List running machines
VBoxManage list runningvms
# Start VM
vagrant up
# Shutting down and remove the VM (all changes will be lost)
vagrant destroy
# SSH into a running VM
@jahe
jahe / javascript-cheatsheet.js
Last active August 18, 2016 16:42
JavaScript Cheatsheet
// Activate ES5 Strict-Mode in whole file
"use strict";
...
// Activate ES5 Strict-Mode just for a specific function
function() {
"use strict";
...
}