Skip to content

Instantly share code, notes, and snippets.

View ArtBIT's full-sized avatar
🤖
Explore, Experiment, Evolve

ArtBIT ArtBIT

🤖
Explore, Experiment, Evolve
View GitHub Profile
@ArtBIT
ArtBIT / coin.ino
Created May 9, 2024 13:43
Arduino Buzzer
#include "pitches.h"
const int SPKR = 13; // Buzzer pin
const int BTN=2;
// notes in the notes:
int notes_1up[] = {NOTE_E5, NOTE_G5, NOTE_E6, NOTE_C6, NOTE_D6, NOTE_G6};
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int durations_1up[] = {4, 4, 4, 4, 4, 4};
@ArtBIT
ArtBIT / klimerko.yaml
Created November 26, 2023 09:31
Klimerko AllThingsTalk Rest Sensor for HomeAssistant
rest:
scan_interval: 900
method: GET
resource: http://api.allthingstalk.io/device/HYdfY2YhmeMxq10ICXvNfST7
headers:
Authorization: !secret my_allthingstalk_bearer_token
sensor:
- name: "Klimerko PM1"
unique_id: 1668683822561
value_template: >-
@ArtBIT
ArtBIT / kimai
Created April 29, 2023 07:04
Bash Helper Script For Kimai Docker
#!/usr/bin/env bash
# Bash Helper Script For Kimai Docker
# https://www.kimai.org/documentation/docker.html
kimai_install() {
docker run --name kimai-mysql \
-e MYSQL_DATABASE=kimai \
-e MYSQL_USER=kimai \
-e MYSQL_PASSWORD=kimai \
@ArtBIT
ArtBIT / _cubic-bezier-easings.scss
Created November 25, 2022 17:58 — forked from ugonnanwosu/_cubic-bezier-easings.scss
Approximated penner equations for cubic-bezier css animation easings
///////////////////////////////////////////
// Animation Cubic Bezier easings //
// see - http://matthewlein.com/ceaser //
///////////////////////////////////////////
// defaults
$ease-linear: "cubic-bezier(0.250, 0.250, 0.750, 0.750)";
$ease-default: "cubic-bezier(0.250, 0.100, 0.250, 1.000)";
$ease-in: "cubic-bezier(0.420, 0.000, 1.000, 1.000)";
$ease-out: "cubic-bezier(0.000, 0.000, 0.580, 1.000)";
@ArtBIT
ArtBIT / vimpipe
Last active October 18, 2019 10:43
Use vim's ex mode inside of unix pipe
\vim - -u NONE -es '+1' "+$*" '+%print' '+:qa!' | tail -n +2
# Commented version
# \vim `# use unaliased version of vim` \
# - `# read from stdin` \
# -u NONE `# do not process .vimrc` \
# -es `# start in :ex mode, do not start visual interface` \
# '+1' `# go to the first line` \
# "+$*" `# process commands passed as arguments` \
@ArtBIT
ArtBIT / glados.sh
Last active April 13, 2021 17:12
GLaDOS eSpeak
random_pitch() {
local delta=${1:-50}
local value=$(( ($RANDOM % $delta) - $delta/2 ))
echo "+${value}" | sed 's/+-/-/'
}
glados() {
local pitch=70
local speed=180
local lang=en
@ArtBIT
ArtBIT / ledger-api.js.patch
Last active May 14, 2019 13:33
ledger-analytics collapse through awk
diff --git i/ledger-api.js w/ledger-api.js
index 963cc90..be07899 100644
--- i/ledger-api.js
+++ w/ledger-api.js
@@ -20,6 +20,9 @@ const cleanInput = (str) => {
return padSpace(str.trim())
}
+const sumByDate = "awk -F' ' '{a[$1]+=$2}END{for(x in a)print x\" \"a[x]}'";
+const pipe = (...commands) => commands.join(" | ");
@ArtBIT
ArtBIT / GRUB_INIT_TUNE.md
Last active May 3, 2024 04:27
GRUB INIT TUNE: Mario Coin

Super Mario Bros. Coin - Grub Init Tune

Do you want your computer to play a coin pickup audio sample from Super Mario Bros. every time it boots up? Of course you do! And if you are using a GRUB boot loader - you CAN!

Just add the following code to your /etc/default/grub config file:

GRUB_INIT_TUNE="600 988 1 1319 8"

And update your grub:

@ArtBIT
ArtBIT / GRUB_INIT_TUNE.md
Last active October 30, 2024 16:16
A collection of GRUB init tunes
@ArtBIT
ArtBIT / WEB
Last active October 31, 2020 16:12
WEB is a minimalistic HTML, CSS, and JavaScript CodePen-like web editor that fits inside a bookmarklet.
# WEB
WEB is a recursive acronym. WEB stands for WEB Editor Bookmarklet.
WEB is a minimalistic HTML, CSS, and JavaScript CodePen-like web editor that fits inside a bookmarklet.
# Usage
Every time you edit the HTML, CSS, and JavaScript in the top three boxes, the result gets evaluated.
# Sharing
Click the share button in the bottom right to copy the contents of your WEB onto the clipboard for sharing.