Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / javascript_resources.md
Last active September 20, 2015 21:32 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@saamalik
saamalik / css_resources.md
Last active September 20, 2015 21:32 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@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 / 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 / .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
@saamalik
saamalik / gist:f91f9fc9d2ebcb90bffc73cf7d08ffce
Created November 20, 2016 21:25
Scalatest WordSpec with ReactiveMongo 2.5
sdfsdfsdfsf
@saamalik
saamalik / ExampleSpec.scala
Created November 20, 2016 21:27
ReactiveMongo 0.12 + ScalaTest WordSpec
import org.scalatest.{AsyncWordSpec, Matchers}
import play.api.libs.json._
import reactivemongo.api.{Cursor, MongoDriver, ReadPreference}
import reactivemongo.play.json._
import reactivemongo.play.json.collection.JSONCollection
import scala.concurrent.Future
class ExampleSpec extends AsyncWordSpec with Matchers {
@saamalik
saamalik / Pro.terminal
Last active September 16, 2017 12:54
MacOX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIMagentaColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjgxMDcyMjgzMjIgMC4zMDQ5NDg5MTUzIDAuNzk2NTYxODY2NgAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp