Skip to content

Instantly share code, notes, and snippets.

View mdzidic's full-sized avatar
:octocat:

Marko Dzidic mdzidic

:octocat:
View GitHub Profile
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
@m-ou-se
m-ou-se / replace-debian-with-arch.txt
Last active October 22, 2023 12:16
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz'
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1
@tjukic
tjukic / FocusThiefBuster
Created December 22, 2014 22:31
(Windows) Keeps track of applications taking focus. Made to find out what process is stealing focus, thus preventing typing and minimizing fullscreen apps.
#include "stdafx.h"
#include "Windows.h"
#include "Oleacc.h"
#include "Psapi.h"
#include <iostream>
//#define _WIN32_WINNT 0x0602
#ifdef _UNICODE
#define tcout std::wcout
@thiagooak
thiagooak / kill-rmq-connections.sh
Created December 13, 2013 12:11
kill ALL rabbitmq connections
rabbitmqctl list_connections pid port state user vhost recv_cnt send_cnt send_pend name | awk '{print "rabbitmqctl close_connection \"" $1 "\" \"manually closing idle connection\"" | "/bin/bash" }'