Skip to content

Instantly share code, notes, and snippets.

View issadarkthing's full-sized avatar

Raziman Mahathir issadarkthing

View GitHub Profile
@issadarkthing
issadarkthing / get_progress_string.sh
Created April 22, 2020 07:19
progress bar in bash
#!/bin/bash
# getProgressString <TOTAL ITEMS> <FILLED LOOK> <NOT FILLED LOOK> <STATUS> <DELIMETER>
# For instance:
# $ getProgressString 10 "#" "-" 50 "|"
# #####|-----
ITEMS="$1" # The total number of items(the width of the bar)
FILLED_ITEM="$2" # The look of a filled item
NOT_FILLED_ITEM="$3" # The look of a not filled item
STATUS="$4" # The current progress status in percent
@issadarkthing
issadarkthing / wait-all.clj
Last active October 1, 2020 03:44
Clojure function that evaluates long running functions and wait for all functions return.
(ns script
(:require [clojure.core.async :as async]))
(defn long-computation
"simulate long running operation"
[x]
(Thread/sleep 1000)
(rand-int x))
@issadarkthing
issadarkthing / init.vim
Last active December 17, 2020 03:34
toggle neovim terminal window
let s:term_window = -1
let s:term_buffer = -1
let s:term_job_id = -1
function! TerminalOpen()
" Check if buffer exists, if not create a window and a buffer
if !bufexists(s:term_buffer)
" Creates a window call monkey_terminal
new local_terminal
@-moz-document url-prefix("https://fosstodon.org") {
.compose-panel .autosuggest-textarea__textarea {
background: #282c37;
}
.compose-form__sensitive-button {
background: #282c37 !important;
}
.icon-button:active, .icon-button:focus, .icon-button:hover {

Keybase proof

I hereby claim:

  • I am issadarkthing on github.
  • I am raziman (https://keybase.io/raziman) on keybase.
  • I have a public key ASCT40Kkeh9tTY5tEl3nU5m-UrSaHjnPeSLQSUCl476WWgo

To claim this, I am signing this object:

import re
import os
import sys
from playsound import playsound
def handle_text(text: str):
"""
Callback that is called upon detected text
"""