Skip to content

Instantly share code, notes, and snippets.

@busla
busla / make-dropbox-url.service
Created August 30, 2020 12:40
Dropbox shared url from gnome screenshots
[Unit]
Description = Monitors ~/Pictures dir, copies new files to ~/Dropbox/Screenshots and creats a shared url
[Service]
User=<your-$USER>
ExecStart=/usr/local/bin/make_dropbox_url.sh
[Install]
WantedBy=multi-user.target
@busla
busla / note.md
Last active January 15, 2021 21:29
Java: skelin, $PATH og $CLASSPATH

Ákvað að taka aðeins saman þessa uppsetningu ef einhver getur nýtt sér.

Athugið að þetta nær aðeins yfir MacOS og Linux því miður en sama aðferð er notuð á Windows en ég hef ekki hugmynd um hvar hlutirnir þar eru staðsettir.

Orðið forrit í eftirfarandi samhengi á við kóða sem hefur verið þýddur(compile-aður) í keyranlega skrá. Orðið skel verður notað sem samheiti yfir allar helstu tegundir skelja sem eru í notkun (sh, bash, zsh, o.s.f.v.)

Keyranleg forrit í skelinni geta verið staðsett í hinum og þessum möppum. Þegar heiti á keyranlegri skrá er sleginn inn í skelinni þá þarf skráin að vera til staðar í möppunni sem heitið er slegið inn. Skelin reynir ekki að leita að skrá með þessu heiti á allri vélinni.

En það væri frekar glatað að þurfa að vita nákvæmlega hvar öll forrit væru staðsett og þurfa svo að auki að cd-a sig inn í möppuna þar sem forritið væri til að keyra það.

@busla
busla / myscript
Created April 19, 2021 19:27 — forked from neatshell/myscript
simple bash template that handles mandatory and optional arguments
#!/bin/bash
script="myscript"
#Declare the number of mandatory args
margs=2
# Common functions - BEGIN
function example {
echo -e "example: $script -m0 VAL -m1 VAL -o1 -o2 VAL"
}
@busla
busla / cypress-dg.svg
Last active April 22, 2021 23:08
cypress dependency graph
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@busla
busla / alpine.svg
Created April 23, 2021 11:15
Alpine dependency graph
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@busla
busla / display.sh
Created April 23, 2021 14:29 — forked from amanusk/display.sh
Easily change between laptop and external displays in i3 + dmenu
#!/bin/bash
# This script is intended to make switching between laptop and external displays easier when using i3+dmenu
# To run this script, map it to some shortcut in your i3 config, e.g:
# bindsym $mod+p exec --no-startup-id $config/display.sh
@busla
busla / fyrtur.yaml
Created June 27, 2022 19:05
home assistant Fyrtur blueprint
# Take from here: https://community.home-assistant.io/t/deconz-ikea-tradfri-open-close-including-press-and-hold/328845?u=vanmak
blueprint:
name: deCONZ - IKEA Tradfri open/close switch
description: |
"Control Furtur roller blind with IKEA Tradfri open/close switch
Select the Tradfri remote and your blinds.
You can open or close the blinds all the way with a single click, hold the button down to adjust them, or hit the opposing button while in motion to stop them."
domain: automation
input:
@busla
busla / idordasafn-response.json
Created June 27, 2023 21:56
example response from idordasafn
{
"results": [
{
"id": 320532,
"fkdictionary": "EDLISFR",
"category": "",
"subcategory": "",
"registerdate": "2004-03-22T11:05:10",
"words": [
{
@busla
busla / tf.sh
Created August 5, 2023 23:24
terraform wrapper script
#!/bin/bash
set -eoux pipefail
PROJECT_DIR="$(git rev-parse --show-toplevel)"
TF_ROOT="${PROJECT_DIR}/terraform"
function info() {
local msg
msg="${1}"
@busla
busla / asana-completed-at.sh
Last active August 11, 2023 00:09
reproduce that completed_at is not writable through Asana task API
#!/bin/bash
: <<'SHOWSTOPPER_DOC'
---------------------------------------------------------
Issue: Inability to Write to the 'completed_at' Field in Asana
---------------------------------------------------------
Migrating to a new project management system like Asana is a significant undertaking, which we undertake with the goal of
improving our workflows and increasing productivity. One of the pivotal aspects of such a migration is ensuring the
continuity and integrity of our historical data.