Skip to content

Instantly share code, notes, and snippets.

@gorenje
gorenje / Impossible Mission Cheat Codes.md
Last active March 14, 2017 17:41
Impossible Mission cheat codes

Cheat notes for Impossible Mission - (Javascript version)

Start by creating a new tab and opening the console - i.e. "inspect element", then load mission impossible

Then in the console you can do a number of things:

  • Give yourself 1000 Snoozes
>>> game.snoozes = 1000
@gorenje
gorenje / Store Motion Description.md
Last active September 29, 2016 18:30
Store motion animated gif

Start screencapture in terminal, a single character will trigger a screencapture:

function _start_screencapture
{
    for n in `seq -f %03g 0 100` ; do
        if read -n 1 ; then
            screencapture -t png ~/Desktop/capture-${n}.png
            echo "Taken " ${n}
        fi
    done
alias gita="git add"
alias gitb="git branch"
alias gitc="git commit"
alias gitc-partial='git commit -p'
alias gitd="git diff"
alias gitdpm="git diff production/master..master/master"
alias gitl="git log"
alias gitm="git merge"
alias gitmmm="git merge master/master"
alias gits="git svn"
---
:date: '2020-03-20'
:data:
- - Van Horn, Texas
- https://www.google.com/maps/@30.8153608,-104.7534251,3a,40.9y,153.38h,85.22t/data=!3m6!1e1!3m4!1sCr4HUuOZy0VQm0F4yUXkqQ!2e0!7i13312!8i6656
- - Chernobyl
- https://www.google.com/maps/@51.4065867,30.0578883,2a,75y,334.32h,85.43t/data=!3m6!1e1!3m4!1satrFki5QB3R5d6ycTY_ZoQ!2e0!7i13312!8i6656
- - Museu Coleção Berardo, Lisabon
- https://www.google.com/maps/@38.6952517,-9.2091074,2a,75y,75.37h,88.05t/data=!3m7!1e1!3m5!1sZCo-agKPo4YoOkfhgdB43A!2e0!6s%2F%2Fgeo1.ggpht.com%2Fcbk%3Fpanoid%3DZCo-agKPo4YoOkfhgdB43A%26output%3Dthumbnail%26cb_client%3Dmaps_sv.tactile.gps%26thumb%3D2%26w%3D203%26h%3D100%26yaw%3D105.11702%26pitch%3D0%26thumbfov%3D100!7i13312!8i6656
- - Galleria d'Arte Moderna - Milano
{"date":"2018-05-01T13:23:09+02:00","data":[{"link":"https://www.google.com/maps/@37.8468361,112.5902328,0a,63y,221.97h,101.22t/data=!3m4!1e1!3m2!1sAF1QipPYVdQtWywqlRxwLddO-OaHVNE-dVPwpm-mvvlp!2e10?source=apiv3","id":"F:AF1QipPYVdQtWywqlRxwLddO-OaHVNE-dVPwpm-mvvlp","objid":"5aa12e84ec0a53001661ce86","location":{"lat":37.8468361,"lng":112.5902328},"pov":{"heading":221.97,"pitch":11.219999999999999},"zoom":0},{"link":"https://www.google.com/maps/@64.9007554,-165.1181193,0a,73.7y,239.01h,109.99t/data=!3m4!1e1!3m2!1sAF1QipPW3qWuuK_jA7fWwTTx-QDYX4fQtbiOASk3dU2V!2e10?source=apiv3","id":"F:AF1QipPW3qWuuK_jA7fWwTTx-QDYX4fQtbiOASk3dU2V","objid":"5aa13063c2a775000eb67212","location":{"lat":64.9007554,"lng":-165.1181193},"pov":{"heading":239.01,"pitch":19.989999999999995},"zoom":0},{"link":"https://www.google.com/maps/@26.6538258,59.1218971,0a,71.7y,159.07h,103.76t/data=!3m4!1e1!3m2!1sAF1QipNxARMe83G2detO_8oMIoP_xY934kCudbNMor39!2e10?source=apiv3","id":"F:AF1QipNxARMe83G2detO_8oMIoP_xY934kCudbNMor39","objid":"5ae710200f
@gorenje
gorenje / README.md
Last active May 25, 2021 13:38
Retrieving Allocated Resources from a Kubernetes Node

Used to retrieve the allocatable resources of a Kubernetes cluster.

Assumes that this is being executed within the K8s cluster.

Tested using python 2.7 and requires the installation of two pip libraries:

pip install pint
pip install kubernetes
statement ruby python elixir node
0 or 1 0 1 syntax error syntax error
0 || 1 0 syntax error 0 1
23.Apr.19 14:07:19 AttributeOne set to 1 for topic one because increment to limit
23.Apr.19 14:07:19 AttributeOne set to 2 for topic one because increment to limit
23.Apr.19 14:07:19 AttributeOne set to 1 for topic one because decrement to limit
23.Apr.19 14:07:19 AttributeOne set to 0 for topic one because decrement to limit
23.Apr.19 14:07:19 AttributeTwo set to 5 for topic one because limited to max 5
@gorenje
gorenje / code.rb
Created June 21, 2019 08:45
Strange things happening
## Ruby 2.5.3
[5] pry(main)> (Date.today -10).strftime("%Y-%m-%d")
=> "2019-06-21"
[6] pry(main)> (Date.today - 10).strftime("%Y-%m-%d")
=> "2019-06-11"
[7] pry(main)> (Date.today-10).strftime("%Y-%m-%d")
=> "2019-06-11"
[13] pry(main)> (1 -3)
=> -2
[14] pry(main)> (1 - 3)
prompt> ./parse.sh example.ini
Configuration description: Sample configuration
[database-fubar]
port = 3306 (access it using ${configuration_database_fubar[port]})
password = dbpass (access it using ${configuration_database_fubar[password]})
server = db.example.org (access it using ${configuration_database_fubar[server]})
username = dbuser (access it using ${configuration_database_fubar[username]})
[monitor-another-minus]
servers = www.example.org proxy.example.org cache.example.org bastion.example.org (access it using ${configuration_monitor_another_minus[servers]})