Skip to content

Instantly share code, notes, and snippets.

View purarue's full-sized avatar

purarue

View GitHub Profile
@DimaKoz
DimaKoz / go-executable-build.sh
Last active October 7, 2024 15:06
The Script to Automate Cross-Compilation for Golang(OSX)
#Before we can use the script, we have to make it executable with the chmod command:
#chmod +x ./go-executable-build.sh
#then we can use it ./go-executable-build.sh yourpackage
#!/usr/bin/env bash
package=$1
if [[ -z "$package" ]]; then
echo "usage: $0 <package-name>"
exit 1
fi
@kuttor
kuttor / ansible-termux.sh
Created March 19, 2019 06:04
Get Ansible working on an Android phone using a Terminal Emulator like Termux
#!/data/data/com.termux/files/usr/bin/bash
yes | pkg upgrade && \
yes | pkg install \
python \
python-dev \
libffi \
libffi-dev \
openssl \
@idealwebsolutions
idealwebsolutions / tts.sh
Last active February 24, 2021 08:03
Streamlabs TTS one liner to disk
#!/bin/env bash
curl -s -d '{"voice": "'"$1"'", "text": "'"$2"'"}' -H "Content-Type: application/json" -H "Context-Type: application/json" https://streamlabs.com/polly/speak | jq -r '.speak_url' | xargs curl -s -0 --output - | ffmpeg -y -i pipe:0 -vn -acodec copy "$3.ogg"
@purarue
purarue / qtile_display_kb.py
Last active October 29, 2024 22:10
print a table of the current keybindings in qtile (v 0.15.1)
#!/usr/bin/env python
#
# Copyright (c) 2017, Piotr Przymus
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@kvgc
kvgc / Promnesia-sidebar.css
Created March 17, 2022 23:34
Custom css to style the sidebar in promnesia (https://github.com/karlicoss/promnesia)
#promnesia-sidebar {
--right: 1;
--size: 30%;
background-color: #ffffff;
opacity: 95%;
font-family: 'math';
font-size: 18px;
}
#!/usr/bin/perl -w
use strict;
@ARGV or die "Usage: $0 PNGFILE...\nOutputs the file names of the PNG files with trailing data.";
FILE: while (@ARGV) {
my $fn = shift;
eval {
no warnings 'exiting';
@phuntik
phuntik / calendar
Last active April 7, 2025 18:29
i3blocks notify-send calendar
#! /bin/bash
# dunstctl set-paused false
send_current() {
TODAY=$(date '+%-d')
month=$(ncal -bhMw)
BODY=$( tail -n7 <<< $month | sed "s/| /▕ /" | sed -z "s/ \($TODAY\) /<span bgcolor='white' color='black'> \1 <\/span>/1" | sed "s/\(.*\)\(.\{8\}\)$/\1<span color='IndianRed'>\2<\/span>/")
HEAD=$(echo "$month" | head -n1)
notify-send -a 'calendar' \