Skip to content

Instantly share code, notes, and snippets.

@busla
busla / show-emojis.sh
Created August 16, 2023 12:14
print emojis in terminal
View show-emojis.sh
# emoji list obtained from https://gist.github.com/BuonOmo/77b75349c517defb01ef1097e72227af
emoji_grinning_face=😀
emoji_grinning_face_with_big_eyes=😃
emoji_grinning_face_with_smiling_eyes=😄
emoji_beaming_face_with_smiling_eyes=😁
emoji_grinning_squinting_face=😆
emoji_grinning_face_with_sweat=😅
emoji_rolling_on_the_floor_laughing=🤣
emoji_face_with_tears_of_joy=😂
emoji_slightly_smiling_face=🙂
@busla
busla / asana-completed-at.sh
Last active August 11, 2023 00:09
reproduce that completed_at is not writable through Asana task API
View asana-completed-at.sh
#!/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.
@busla
busla / tf.sh
Created August 5, 2023 23:24
terraform wrapper script
View tf.sh
#!/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 / idordasafn-response.json
Created June 27, 2023 21:56
example response from idordasafn
View idordasafn-response.json
{
"results": [
{
"id": 320532,
"fkdictionary": "EDLISFR",
"category": "",
"subcategory": "",
"registerdate": "2004-03-22T11:05:10",
"words": [
{
@busla
busla / fyrtur.yaml
Created June 27, 2022 19:05
home assistant Fyrtur blueprint
View fyrtur.yaml
# 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 / display.sh
Created April 23, 2021 14:29 — forked from amanusk/display.sh
Easily change between laptop and external displays in i3 + dmenu
View display.sh
#!/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 / alpine.svg
Created April 23, 2021 11:15
Alpine dependency graph
View alpine.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@busla
busla / cypress-dg.svg
Last active April 22, 2021 23:08
cypress dependency graph
View cypress-dg.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@busla
busla / myscript
Created April 19, 2021 19:27 — forked from neatshell/myscript
simple bash template that handles mandatory and optional arguments
View myscript
#!/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 / note.md
Last active January 15, 2021 21:29
Java: skelin, $PATH og $CLASSPATH
View note.md

Á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ð.