Skip to content

Instantly share code, notes, and snippets.

@kmanna
kmanna / caltrain.2014.gopass.companies.html
Created December 13, 2013 00:42
Caltrain 2014 List of companies with GoPass
<select class="ipbf-select" id="QIAIDSELECT_6421" name="QIAIDSELECT_6421">
<option value="-1" selected=""></option>
<option value="19746">23andMe</option>
<option value="19747">A9.com</option>
<option value="19748">Adobe</option>
<option value="19754">Amazon.com</option>
<option value="19749">Ancestry.com</option>
<option value="19750">Badgeville</option>
<option value="19751">Big Switch Networks</option>
<option value="19752">Box</option>
@kmanna
kmanna / cecloader.h
Created January 13, 2014 21:35
Why so ugly?
/*!
* @brief Create a new libCEC instance.
* @param configuration The configuration to pass to libCEC
* @param strLib The name of and/or path to libCEC
* @return An instance of ICECAdapter or NULL on error.
*/
CEC::ICECAdapter *LibCecInitialise(CEC::libcec_configuration *configuration, const char *strLib = NULL)
{
if (!g_libCEC)
{
@kmanna
kmanna / ivy-promote.sh
Last active December 26, 2015 09:09
Example Ivy promotion script to promote milestones to release builds without using Ant.
#!/bin/sh
#
# Example Ivy promotion script to promote milestones to release builds
#
ORG="$1"
MOD="$2"
OUT="./promote"
REV="latest.milestone"
IVY="~/.ant/lib/ivy-2.3.0.jar"
@kmanna
kmanna / smem.py
Last active December 25, 2015 02:58
smem with json and stdin support
#!/usr/bin/env python
#
# smem - a tool for meaningful memory reporting
#
# Copyright 2008-2009 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of
# the GNU General Public License version 2 or later, incorporated
# herein by reference.
From 9b55aebfea81ca8ac9f0731736fffee826537de8 Mon Sep 17 00:00:00 2001
From: Kyle Manna <kmanna@fanhattan.com>
Date: Wed, 19 Jun 2013 18:10:03 -0700
Subject: [PATCH 1/3] bluetooth: Add ability to pass connection params
* Useful for adding Bluetooth Low Energy Connection Parameters which
are currently hardcoded.
---
include/net/bluetooth/hci_core.h | 5 ++--
include/net/bluetooth/l2cap.h | 4 ++++
#!/bin/sh
let i=0
killall wpa_supplicant
wpa_supplicant -c /etc/wifi/wpa_supplicant.conf -i wlan0
while true;
do
echo $i;
i=$(($i+1))
wpa_cli -p /data/misc/wifi/sockets scan
usleep 750000
$ time (for i in seq $((86400 * 365 * 10)) ; do echo $i | gmd5sum; done > /dev/null)
( for i in seq $((86400 * 365 * 10)); do; echo $i | gmd5sum; done > /dev/null)
0.00s user 0.00s system 76% cpu 0.007 total
@kmanna
kmanna / repo.sync.txt
Created December 16, 2014 19:28
Fail.
$ repo sync
...
File "/aosp/.repo/repo/project.py", line 1853, in _RemoteFetch
initial=False, quiet=quiet, alt_dir=alt_dir)
File "/aosp/.repo/repo/project.py", line 1853, in _RemoteFetch
initial=False, quiet=quiet, alt_dir=alt_dir)
File "/aosp/.repo/repo/project.py", line 1853, in _RemoteFetch
initial=False, quiet=quiet, alt_dir=alt_dir)
File "/aosp/.repo/repo/project.py", line 1853, in _RemoteFetch
initial=False, quiet=quiet, alt_dir=alt_dir)
The following packages will be REMOVED:
bash* dash*
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
bash dash (due to bash)
0 upgraded, 0 newly installed, 2 to remove and 44 not upgraded.
After this operation, 1749 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] Abort.
@kmanna
kmanna / -
Created November 21, 2014 20:20
diff --git a/Dockerfile b/Dockerfile
index 8a9aa36..71b5e48 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -27,12 +27,12 @@ RUN chmod 755 /usr/local/bin/*
# All builds will be done by user aosp
RUN useradd --create-home aosp
ADD gitconfig /home/aosp/.gitconfig
+ADD ssh_config /home/aosp/.ssh/config
RUN chown aosp:aosp /home/aosp/.gitconfig