Skip to content

Instantly share code, notes, and snippets.

View btipling's full-sized avatar
:shipit:
shipping code

btipling

:shipit:
shipping code
  • ConductorOne
  • Bay Area, California
  • 23:25 (UTC -12:00)
View GitHub Profile
Booting 'user bootloader configuration'
root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
configfile /boot/grub/menu.lst
[root@btipling ~]# ls -l /mnt/boot
total 14396
-rw-r--r-- 1 root root 643984 Apr 28 18:39 abi-2.6.32-22-generic-pae
-rw-r--r-- 1 root root 116302 Apr 28 18:39 config-2.6.32-22-generic-pae
drwxr-xr-x 3 root root 4096 Jun 1 21:29 grub
-rw-r--r-- 1 root root 7906450 Jun 1 20:05 initrd.img-2.6.32-22-generic-pae
-rw-r--r-- 1 root root 160280 Mar 23 09:37 memtest86+.bin
-rw-r--r-- 1 root root 1728514 Apr 28 18:39 System.map-2.6.32-22-generic-pae
-rw-r--r-- 1 root root 1200 Apr 28 18:42 vmcoreinfo-2.6.32-22-generic-pae
-rw-r--r-- 1 root root 4158880 Apr 28 18:39 vmlinuz-2.6.32-22-generic-pae
[root@btipling ~]# cat /mnt/boot/grub/menu.lst
default=0
timeout=5
title Ubuntu lucid
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-22-generic-pae root=/dev/xvda1 ro
initrd /boot/initrd.img-2.6.32-22-generic-pae
title Ubuntu lucid single user
[root@btipling ~]# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (ro,data=ordered)
/dev on /dev type tmpfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
none on /selinux type selinuxfs (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
devpts on /dev/pts type devpts (rw)
none on /var/lib/stateless/writable type tmpfs (rw)
function run_demo() {
var k = new goog.ds.JsDataSource([], 'mypath');
goog.ds.DataManager.getInstance().addListener(function (a,b) {console.log(a,b);}, k.getDataPath() + '/fi');
k.setChildNode('fee', {'data': 1});
k.setChildNode('fi', {'data': 2});
k.setChildNode('fo', {'data': 3});
k.setChildNode('fum', {'data': 4});
dio.ID3Finder = function () {};
dio.ID3Finder._songMap = {};
dio.ID3Finder.getInfoForSong = function (song, callback) {
var req;
if (song.url in dio.ID3Finder._songMap) {
callback();
@btipling
btipling / circular_test.js
Created April 24, 2011 20:41
Circular reference
//File a.js:
var b = require('./b');
exports.A = function () {
console.log('A');
b.B();
};
@btipling
btipling / gist:1554096
Created January 3, 2012 08:33
Opening a file with default app in android
try {
URL url = file.toURI().toURL();
String ext = MimeTypeMap.getFileExtensionFromUrl(url.toString());
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), map.getMimeTypeFromExtension(ext)));
startActivity(intent);
} catch (Exception e) {
Log.e(TAG, "Malformed URL: " + e, e);
@btipling
btipling / gist:1559304
Created January 4, 2012 09:32
Filtering out system files on Android
/**
* Return whether the given PackgeInfo represents a system package or not.
* User-installed packages (Market or otherwise) should not be denoted as
* system packages.
*
* @param pkgInfo
* @return
*/
private boolean isSystemPackage(PackageInfo pkgInfo) {
return ((pkgInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) ? true