Skip to content

Instantly share code, notes, and snippets.

@saamalik
saamalik / 0_reuse_code.js
Last active September 20, 2015 21:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@saamalik
saamalik / pacmd ls
Created February 22, 2015 09:42
A2DP Bluetooth headset issues with PulseAudio 6.0
Memory blocks currently allocated: 8, size: 86.6 KiB.
Memory blocks allocated during the whole lifetime: 236177, size: 249.1 MiB.
Memory blocks imported from other processes: 0, size: 0 B.
Memory blocks exported to other processes: 0, size: 0 B.
Total sample cache size: 0 B.
Default sample spec: s16le 2ch 44100Hz
Default channel map: front-left,front-right
Default sink name: bluez_sink.00_0C_8A_EA_B3_96
Default source name: bluez_source.00_0C_8A_EA_B3_96
Memory blocks of type POOL: 7 allocated/137143 accumulated.
@saamalik
saamalik / xcb-test.c
Last active January 3, 2016 12:39
XCB repeating keys problem. Compile as: gcc -o xcb-test -lm -lxcb -lxcb-xtest xcb-test.c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <xcb/xtest.h>
int main(int argc, char *argv[])
@saamalik
saamalik / vimcompile.txt
Created June 18, 2013 19:26
Compile VIM under Cygwin
1. Install cygwin packages using setup.exe: gcc4, make, libncurses-devel, mercurial
2. hg clone https://vim.googlecode.com/hg/ vim && cd vim
3. ./configure --prefix=/usr/ \
--enable-gui=no \
--without-x \
--disable-nls \
--enable-multibyte \
--with-tlib=ncurses \
--enable-pythoninterp \
--enable-rubyinterp \
@saamalik
saamalik / tmux-client-3239.log
Created June 2, 2013 00:58
Tmux lost server crash when sending mouse cursor escape sequence
got 8 from server
@saamalik
saamalik / .tmux.conf
Last active April 12, 2016 16:06
My Tmux configuration
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -s escape-time 4
# Rest the cursor back to input mode