Skip to content

Instantly share code, notes, and snippets.

@kmanna
kmanna / Custom.css
Last active August 29, 2015 13:56
Just Kidding...
/* ~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css */
/* GoGo @ 2014.02.04 */
body { -webkit-transform: rotate(0.02deg); }
img { -webkit-transform: rotate(0.5deg); }
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <stdint.h>
#include <sys/types.h>
#
# Shell functions to wrap cmdline utility output with JSON
#
# Useful for running shell commands and then extracting output with logstash
#
json_kv_pair()
{
K="$1" # key
V="$2" # value
Q="$3" # quote
@kmanna
kmanna / gist:336affe17fee55dd8fc1
Last active August 29, 2015 14:01
Ubuntu 14.04 LTS Kernel panic when using Docker + pipework (+ dnsmasq). Sigh.
[ 2975.325505] ------------[ cut here ]------------
[ 2975.325515] WARNING: CPU: 5 PID: 4604 at /build/buildd/linux-3.13.0/fs/sysfs/dir.c:486 sysfs_warn_dup+0x86/0xa0()
[ 2975.325517] sysfs: cannot create duplicate filename '/devices/virtual/net/em1.30/upper_ph3491eth1'
[ 2975.325519] Modules linked in: macvlan veth xt_nat bridge ip6t_REJECT xt_hl ip6t_rt nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT xt_LOG aufs ipt_MASQUERADE iptable_nat nf_nat_ipv4 xt_limit xt_tcpudp xt_addrtype
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack ip6table_filter ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack iptable_filter ip_tables x_tables snd_hda_cod
ec_realtek radeon ttm snd_hda_intel snd_hda_codec 8021q drm_kms_helper snd_hwdep snd_pcm garp snd_page_alloc drm i2c_algo_bit dcdbas gpio_ich coretemp stp mrp dell_wmi sparse_keymap ppdev llc snd_timer serio_raw s
nd i7core_edac edac_core wmi kvm_intel soundcore kvm lpc_ich mac_hid parport_pc e1000e ptp pps_core lp parport
@kmanna
kmanna / gist:4afff0ab64f0a676d79f
Created August 11, 2014 21:18
btrfs crashed system last output from watch cmd:
Data, single: total=640.00GiB, used=628.88GiB
Data, RAID5: total=786.00GiB, used=785.99GiB
System, RAID1: total=64.00MiB, used=196.00KiB
Metadata, RAID1: total=269.00GiB, used=2.29GiB
unknown, single: total=512.00MiB, used=0.00
Label: 'massive' uuid: b705fef7-a604-4ba1-bc43-bc387e58c733
Total devices 3 FS bytes used 1.38TiB
devid 1 size 1.77TiB used 1.01TiB path /dev/sdb2
devid 2 size 875.63GiB used 662.06GiB path /dev/sdc2
<?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>ANSIBlueColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NKMC4y
IDAuNCAxABABgALSEBESE1okY2xhc3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNP
YmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRFxhUcm9vdIABCBEaIy0yNztBSE5bYm1vcXaB
From 8f073c7661197cefe8fbfaa723b96a522420c672 Mon Sep 17 00:00:00 2001
From: Kyle Manna <kmanna@fanhattan.com>
Date: Fri, 22 Aug 2014 15:04:20 -0700
Subject: [PATCH] HACK: wipe: Add timing parameters
* Add timing parameters
Change-Id: If82f1777355e56ccc4ea3c6722d0bf1771e1e630
---
ext4_utils/Android.mk | 9 +++++++++
#!/bin/bash
# Search through a AOSP branch for something interesting
set -x
find $HOME/ovation \
\( \
-iname Makefile \
-o -iname \*.xml \
-o -iname \*.py \
-o -iname \*.aidl \
-o -iname \*.mk \
@kmanna
kmanna / vimdiff.md
Last active August 29, 2015 14:06 — forked from mattratleph/vimdiff.md

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@kmanna
kmanna / -
Created September 9, 2014 01:28
Thought For The Day (A Beautiful Poem)
by Fattire
Puppies playing puppily
Monkeys swinging from a tree,
Fishes swimming in the sea,
Reminding me
Some best things in life...
are free.