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 / docker-cheatsheet.sh
Last active December 8, 2020 18:16
Docker Cheatsheet
# Start VM
boot2docker start
# Show VM status
boot2docker status
# Start an nginx container "web" on the docker_host (the vm)
# -d keeps the container running in the background
# -P publishes exposed ports from the container to your local host (öffnet die vom Container genutzten Ports)
# --name assigns a name to the container
@jahe
jahe / bash-cheatsheet.sh
Last active December 4, 2022 22:49
Bash Cheatsheet
# Create a file and insert some text with the ">" operator
echo "my new site" > index.html
# Show PATH
echo $PATH # /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
# /usr/local/bin is in the PATH by default
# Create symbolic link (symlink)
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
@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 / chrome-dev-tools-cheatsheet.js
Last active May 30, 2023 19:36
Chrome Dev Tools Cheatsheet
// Switch Colour Representation (HEX -> HSL -> ...)
Shift + Click on the colourpicker
// Search DOM-Nodes by CSS classnames
Cmd + F -> ".hidden p"
// Jump to a specific line
Cmd + P -> ":39"
// Open a File by searching for the filename
@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 / 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";
...
}
@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 / batch-cheatsheet.bat
Last active January 29, 2021 18:48
Batch Cheatsheet
REM Display text file in shell
type config.json
REM Show running processes
tasklist
REM Kill process bei PID
taskkill /pid 1060
REM Get Command Line and PID of one process