Skip to content

Instantly share code, notes, and snippets.

@thikade
thikade / regex_demo_sippet.sh
Created December 11, 2017 21:14
bash regex
# INSTANCE_RAM examples
# INSTANCE_RAM=8G or INSTANCE_RAM=12m
regex='^([[:digit:]]+)([GgMm])$'
if [[ "${INSTANCE_RAM}" =~ $regex ]]; then
num=${BASH_REMATCH[1]}
unit=${BASH_REMATCH[2]}
if [[ $unit =~ [Gg] ]]; then
((num = num * 1024)) # enables math to work out for odd gigs
fi
@thikade
thikade / gist-reveal.it-slides.html
Created February 16, 2018 18:10 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@thikade
thikade / hue_tipps.md
Last active March 18, 2018 14:40
Philips Hue Hints

Reset Hue Lights using dimmer switch

If you have a Hue dimmer switch: press and hold the On and Off buttons for 10 secs while holding the switch close (< 15 cm) to the bulb.

Re-Setup any light in WLL Dresden-Electronics (DeConz App)

  1. Reset Light (see above)
  2. Delete Light from Deconz Gui
  3. Open Network
  4. Register new light

Re-Setup Philips Hue Dimmer Switch

@thikade
thikade / openshift-cheatsheet.md
Created April 3, 2018 09:21 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet
  • Binary Builds
oc new-build --binary=true --name=ola2 --image-stream=redhat-openjdk18-openshift
oc start-build ola2 --from-file=./target/ola.jar --follow
oc new-app 
  • Turn off/on DC triggers to do a batch of changes without spam many deployments
@thikade
thikade / mcp.desktop
Last active July 27, 2024 05:54
control minecraft-pi using xbox controller on raspberry pi
[Desktop Entry]
Name=Minecraft Pi MCP
Comment=Fun with Blocks
# TryExec=minecraft-pi
Exec=/home/pi/mcp.sh
Icon=/usr/share/pixmaps/minecraft-pi.png
Terminal=false
Type=Application
Categories=Application;Game;
StartupNotify=true
@thikade
thikade / remove_shell_color_codes.md
Created January 22, 2019 14:10
remove shell color codes / escape code
ls -l --color | perl -npe 's/\x1b(\[.*?[@-~]|\].*?(\x07|\x1b\\))//g;'
@thikade
thikade / websphere_messages.md
Last active July 22, 2019 15:19
Websphere important message IDs

Start / Stop of application

  • WSVR0200I: Starting application

  • WSVR0203I: Application: Application build level:

  • WSVR0217I: Stopping application:

  • WSVR0220I: Application stopped:

  • WSVR0221I: Application started:

  • WSVR0190I: Starting composition unit WebSphere:cuname= in BLA <>.

  • WSVR0191I: Composition unit WebSphere:cuname= in BLA <> started.

  • WSVR0193I: Composition unit WebSphere:cuname= in BLA <> stopped.

@thikade
thikade / groovy_cheatsheet.md
Last active February 6, 2023 13:38
Jenkins / Groovy language patterns

links

Jenkins Shared Pipelines

killing hanging jenkins jobs

go to script console https://<jenkins>/script, find out JobName and JobNumber, then run:

def jobName = "JobName" // pls change!
def jobNumber = 42      // pls change!
Jenkins.instance.getItemByFullName(jobName)
 .getBuildByNumber(jobNumber)
@thikade
thikade / vim_syntaxchecker.md
Last active June 25, 2024 04:52
vim syntax checker / syntastic yamllint

Getting vim yaml linter to work:

  1. Install syntastic vim plugin (as of vim 7.4.x no plugin manager is required anymore!)
    mkdir -p ~/.vim/pack/$USER/start/
    cd ~/.vim/pack/$USER/start/
    git clone https://github.com/vim-syntastic/syntastic.git
    
  2. Install yamllint: pip3 install yamllint
  3. Configure yamllint:
@thikade
thikade / jarscan_readme.md
Last active August 19, 2019 12:14
jarscan hintsheet

download

https://jarscan.com/

usage

  • java -jar jarscan.jar -showProgress -dir /appDir/ -package org.apache.cxf.ws
  • java -jar jarscan.jar -showProgress -dir /appDir/ -class LoginAbortException