Skip to content

Instantly share code, notes, and snippets.

View ugjka's full-sized avatar
☁️
Be like a burnt rope and let the winds take the ashes

Uģis Ģērmanis ugjka

☁️
Be like a burnt rope and let the winds take the ashes
View GitHub Profile
package main
import (
"bytes"
_ "embed"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
@ugjka
ugjka / ircwebradio.go
Last active March 29, 2024 04:42
IRC text-to-speech http mp3 server. https://ugjka.net/irc-radio/
// IRC text-to-speech server
// needs ffmpeg and piper-tts (https://github.com/rhasspy/piper)
//
// Example stream:
// https://ugjka.net/irc-radio/
// mpv https://ugjka.net/ircradio
// mpg123 https://ugjka.net/ircradio
//
// configuration? change the constants and build
package main
@ugjka
ugjka / welcome.go
Created January 18, 2021 15:31
System status Kdialog greeter
package main
import (
"bytes"
"fmt"
"log"
"os/exec"
"strings"
"syscall"
"time"
@ugjka
ugjka / fb_on_desktop.js
Last active December 6, 2020 18:24
Facebook mobile on desktop
// ==UserScript==
// @name Facebook Mobile on Desktop
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Enhancments for FB mobile on Desktop!
// @author https://github.com/ugjka/
// @match https://m.facebook.com/*
// @grant none
// ==/UserScript==
@ugjka
ugjka / MainActivity.java
Created October 23, 2019 14:13 — forked from saurabhalang/MainActivity.java
How to convert any Website into Android App in Android Studio?
// add this code to the onCreate method of your MainActivity.java File
String url ="URL" ; // Replace URL with your website address like this "http://google.com"
WebView view = (WebView) this.findViewById(R.id.webView);
view.getSettings().setJavaScriptEnabled(true);
view.loadUrl(url);
@ugjka
ugjka / radio.go
Last active July 5, 2019 22:29
I little script to play my favourite radio stations without buffer latency (uses MPV for playback)
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"net/http"
"os"
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,lv,lv,ru"
#Option "XkbModel" "pc104"
Option "XkbVariant" "dvorak,minuskeydvorak,apostrophe,phonetic"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
FONT=lat4-16
KEYMAP=dvorak
net.ipv4.tcp_ecn=1
net.ipv4.tcp_low_latency=1
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_reordering=3
net.ipv4.tcp_sack=0
net.ipv4.tcp_fastopen=1
net.core.wmem_max=262144
net.core.rmem_max=262144
net.ipv4.tcp_rmem= 65536 131072 262144
net.ipv4.tcp_wmem= 65536 131072 262144