This file contains hidden or 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
#!/usr/bin/env bash | |
sinks=($(pacmd list-sinks | grep index | \ | |
awk '{ if ($1 == "*") print "1",$3; else print "0",$2 }')) | |
inputs=($(pacmd list-sink-inputs | grep index | awk '{print $2}')) | |
[[ ${sinks[0]} = 0 ]] && swap=${sinks[1]} || swap=${sinks[3]} | |
pacmd set-default-sink $swap &> /dev/null | |
for i in ${inputs[*]}; do pacmd move-sink-input $i $swap &> /dev/null; done |
This file contains hidden or 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 random import random, seed | |
from contextlib import nested | |
seed(31337) | |
k = 0.5 | |
with nested(open('in.txt'), open('out1.txt', 'w'), open('out2.txt', 'w')) as \ | |
(inp, out1, out2): | |
for line in inp.readlines(): | |
if random() > k: |
This file contains hidden or 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
class Yoba(object): | |
def __init__(self, name): | |
self.name = name | |
y = Yoba('YOBA') | |
def hello(self): | |
print "PRIVET ETO %s" % self.name | |
Yoba.hello = hello |
This file contains hidden or 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
pkgname=kbdd | |
pkgver=0.6.2 | |
pkgrel=1 | |
pkgdesc="Simple daemon and library to make per window layout." | |
arch=('i686' 'x86_64') | |
url="https://github.com/qnikst/kbdd" | |
license=('GPL3') | |
depends=() | |
source=("https://github.com/downloads/qnikst/$pkgname/$pkgname-$pkgver.tar.bz2") | |
md5sums=('961d7d8f78674b4d6ce250fb4732bf0f') |
This file contains hidden or 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
Package: twmn | |
Version: 2012.08.25 | |
Architecture: amd64 | |
Maintainer: Ilya Strukov <[email protected]> | |
Depends: libboost-program-options1.49.0, libboost-system1.49.0, libdbus-1-3, libqtcore4, libqtgui4, libqt4-network | |
Priority: optional | |
Description: A notification system for tiling window managers. |
This file contains hidden or 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 <stdio.h> | |
#include <ffi.h> | |
#include <assert.h> | |
int main() { | |
ffi_cif cif; | |
int rc; | |
const char *fmt = "string=%s, integer=%d\n"; | |
const char *str = "hello"; |
This file contains hidden or 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use constant WINDOWS => 3; | |
my $name = shift; | |
$name or die "Usage: tmux-link name"; | |
system "tmux rename-session $name"; |
This file contains hidden or 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
SRC=XCompose bashrc gitconfig i3 i3status.conf inputrc mplayer oh-my-zsh \ | |
perldb perltidyrc racketrc sbclrc screen screenrc ssh/config taskrc tmux.conf \ | |
xinitrc zshrc psqlrc pentadactylrc Xdefaults Xmodmap zsh fonts.conf config/redshift.conf | |
DST=$(addprefix $(HOME)/.,$(SRC)) | |
TWMN_DIR=$(HOME)/.config/twmn | |
SSH_CONN_DIR=$(HOME)/.ssh/connections | |
.PHONY: all links rvm submodule ssh_conn | |
all: links submodule vim |
This file contains hidden or 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
#!/usr/bin/env perl | |
use Cwd 'abs_path'; | |
use File::Basename; | |
use strict; | |
use warnings; | |
my $to = '[email protected]'; | |
my $path = abs_path($0); | |
my $mutt_cfg = dirname($path) . "/robot.muttrc"; |
This file contains hidden or 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
# vim:filetype=i3conf | |
set $mod Mod4 | |
set $mybin /home/iley/bin | |
set $wallpaper /home/iley/wallpaper.jpg | |
force_xinerama yes | |
# font for window titles. ISO 10646 = Unicode | |
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 |