Skip to content

Instantly share code, notes, and snippets.

@Thor77
Thor77 / ikea_available.sh
Created January 31, 2021 20:17
Check IKEA item availability and restock date
#!/bin/bash
# check ikea item availability and return available stock / restock date
# requires xpath binary (libxml-xpath-perl) and curl
#
# ./ikea_available.sh <store id> <item id>
# example: ./ikea_available.sh 551 70189022
# list of store IDs: https://gist.github.com/joshuajung/02ccd4221248776bd8f9
# item id: digits in url when viewing item page
store=$1
item=$2
@Thor77
Thor77 / miniflux_old_read.sh
Created April 11, 2020 20:52
Mark old Miniflux entries from a specific category as read
base_url=""
token=""
auth_header="X-Auth-Token: $token"
category=5
before=$(date -d -7days +%s)
entries_json=$(curl -sS "${base_url}/v1/entries?status=unread&limit=10000&category_id=${category}&before=$before" -H "$auth_header" | jq -c '{ status: "read", entry_ids: [ .entries[] | .id ] }')
echo "$entries_json"
curl -X PUT -H "Content-Type: application/json" -H "$auth_header" -d "$entries_json" "${base_url}/v1/entries"
@Thor77
Thor77 / cssh.sh
Created April 8, 2018 10:41
cssh for Vagrant
#!/bin/sh
CONFIG_LOCATION="/tmp/vagrant-ssh-config-$(date +%s)"
vagrant ssh-config > $CONFIG_LOCATION
cssh -o "-F $CONFIG_LOCATION" $@
# Usage: ./cssh.sh <name defined in multi-server environment>...
@Thor77
Thor77 / authorize.sh
Last active October 22, 2019 21:16
My public SSH key
# stolen from jhass: https://gist.github.com/jhass/66f02fe5044fa720c623
echo -e "\n$(curl -L https://gist.githubusercontent.com/Thor77/60f58a0ee81cda889a65dab4413ad94c/raw/jonas.pub)\n" >> ~/.ssh/authorized_keys
[Desktop Entry]
Type=Application
Version=0.4.0
Name=Goat Attack
Comment=Probably the best game involving goats and shotguns!
Exec=goatattack
Icon=goatattack
Terminal=false
Cateogires=Games

Keybase proof

I hereby claim:

  • I am thor77 on github.
  • I am thor77 (https://keybase.io/thor77) on keybase.
  • I have a public key whose fingerprint is C75A E9CA 8719 428E BD1B 19A7 5051 E71B 46AA 669A

To claim this, I am signing this object: