This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threading import Thread | |
import numpy as np | |
import sounddevice as sd | |
import time, pygame | |
from pygame.locals import * | |
pygame.init() | |
def listen(): | |
global data, ind | |
stream = sd.InputStream(samplerate=rate, channels=1, dtype=np.int16) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Use this script to convert discord emotes to tiny stickers in telegram | |
# Example package: https://t.me/addstickers/emotepk | |
for f in *.png; do | |
name=${f%.png} | |
convert $f -resize '512x256' -background none -extent '512x256' $name.out.png | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
C1="first vpn connection" | |
C2="second vpn connection" | |
on() { | |
nmcli con up $C1 | |
nmcli con up $C2 ifname tun0 | |
sudo nmcli con mod tun0 ipv4.never-default true | |
sudo nmcli con reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE | |
ScopedTypeVariables, | |
Rank2Types, | |
TemplateHaskell, | |
NoMonomorphismRestriction | |
#-} | |
module Data.SegmentTree.Lens | |
( Segment | |
, cnt, middle, value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Maybe | |
import Data.List | |
import Control.Monad.State | |
import Control.Monad | |
type Var = String | |
type Value = String | |
type Variables = [(Var, Value)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Type=Service | |
X-KDE-ServiceTypes=KonqPopupMenu/Plugin | |
MimeType=inode/directory; | |
Actions=fimlAction; | |
Icon=videoclip-amarok | |
[Desktop Action fimlAction] | |
Name=Fiml | |
Icon=videoclip-amarok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <err.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
enum { | |
SOLVED = 0, |