Skip to content

Instantly share code, notes, and snippets.

View revmischa's full-sized avatar
🇺🇦

Mischa Spiegelmock revmischa

🇺🇦
View GitHub Profile
@revmischa
revmischa / build-video-server.sh
Created December 16, 2010 00:25
Build and install libx264, libav and rtmpd
#!/usr/bin/env bash
# This script fetches and builds libx264, libav, rtmpd and their dependencies.
# you may have to add /usr/local/lib to /etc/ld.so.conf
# BASEDIR = build directory (default current dir)
# PREFIX = install directory (default /usr/local)
if [ -z "$BASEDIR" ]; then
BASEDIR=`pwd`
fi
@revmischa
revmischa / how_computers_work.txt
Last active September 30, 2021 03:11
How computers work
How computers work
==================
Most people on the planet directly interact with computers on a daily
basis. They may be fooling around on their cell phone, writing a paper
for their homework, or playing video games. Despite the ubiquity
of digital computing devices, there is an astonishingly small number of
people who are familiar with the inner workings of these devices. Not
only that, but due to the fact most people think of computers in
@revmischa
revmischa / gist:941527
Created April 26, 2011 00:17
Migrate pivotal tracker stories to github issues
#!/usr/bin/env perl
# Migrate PT stories to GitHub issues
use Moose;
use WWW::PivotalTracker qw/
add_note
@revmischa
revmischa / ReplicationLag.pm
Created July 8, 2011 21:44
Nagios/icinga replication lag check
# Reports replication lag in seconds
# For use with Postgresql and repmgr
# Usage: -c lag_seconds_threshold -n standby_node_id
# Sample output: REPMGR OK - Replication apply time lag: 1 seconds, 11 kB
package MyApp::Monitor::ReplicationLag;
use Moose;
@revmischa
revmischa / bootstrap.sh
Created September 21, 2011 18:39
Bootstrap a brand new debian system
#!/bin/bash
PUPPET_HOST="ebola.int80.biz"
function set_hostname {
echo "Hostname: "
read hostname
echo "$hostname" > /etc/hostname
echo "127.0.1.1 $hostname" >> /etc/hosts
hostname "$hostname"
@revmischa
revmischa / branch_stats.pl
Created October 26, 2011 03:23
Compare branches vs. branch mispredictions in libav profiling output
#!/usr/bin/env perl
# This script takes two files with profiling information about branch
# misprediction as input. It outputs the percentage of branch
# mispredictions per instruction address
use strict;
use warnings;
my $stats = compute_branch_misprediction_stats();
@revmischa
revmischa / wr703n-blink.c
Created January 7, 2012 22:53
TP-LINK WR703n LED Blinker
@revmischa
revmischa / pubsub_munin.sh
Created January 17, 2012 00:27
Web::Hippie::PubSub munin plugin
GRAPH_TYPE='GAUGE'
if [ "$1" = "config" ]; then
echo 'graph_title Web::Hippie::PubSub subscribers'
echo 'graph_vlabel events'
echo 'graph_category HTTP'
echo 'current_subscribers.label current subscribers'
echo "current_subscribers.type $GRAPH_TYPE"
@revmischa
revmischa / install_panoptic.sh
Created March 15, 2012 03:51
Set up everything needed for panoptic
#!/bin/bash
INSTALLDIR="$HOME/local/panoptic"
function step() {
NAME=$1
if [[ -z "$NAME" ]]; then
echo "Function name required"
exit 1
@revmischa
revmischa / elitedesktop.md
Last active October 2, 2015 23:57
Pimp Your Linux

THIS ASSUMES YOU RUN DEBIAN (or ubuntu, mint) AND ARE NOT A SUCKA MC

XDM

sudo aptitude install xdm pterm xtrlock
sudo echo '/usr/bin/xdm' > /etc/X11/default-display-manager

spectrwm, dmenu

sudo aptitude -y install dmenu libxtst-dev libxrandr-dev libxcursor-dev libxft-dev libx11-xcb-dev libxcb-util0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-xtest0-dev libxcb-randr0-dev libxt-dev
git clone git://opensource.conformal.com/spectrwm.git
cd spectrwm/linux