Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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 / openshift_inline_jenkinsfile.md
Created November 3, 2017 19:33
openshift tips and tricks
spec:
  nodeSelector: {}
  output: {}
  postCommit: {}
  resources: {}
  runPolicy: Serial
  strategy:
    jenkinsPipelineStrategy:
 env:
@thikade
thikade / docker-machine.md
Created September 27, 2017 11:00
docker-machine cheatsheet

remove existing default machine:

docker-machine rm default

upgrade existing default machine:

docker-machine upgrade default

create NEW default machine:

docker-machine create -d virtualbox --virtualbox-memory 8192 --virtualbox-cpu-count "2" --virtualbox-disk-size "30000" default

set Graphics mem parameter

@thikade
thikade / do_api_readme.md
Last active September 2, 2019 14:30
Filtering Digital Ocean API request using jq

Prereqs

export TOKEN=yourtoken

Display DO available droplet sizes

API Link

All sizes

@thikade
thikade / ansible_cheatsheet.md
Last active September 11, 2017 15:40
ansible cheat-sheet