Skip to content

Instantly share code, notes, and snippets.

@shoban
shoban / ImageViewportResizer.html
Last active May 21, 2016 01:42
Resize image inside viewport to fit according to your preference. Plain load the html file to display help.
<!DOCTYPE html>
<html>
<style type="text/css" media="screen">
* {
margin: 0;
padding: 0;
}
#viewport {
position: fixed;
@shoban
shoban / config.log
Created September 20, 2012 11:10
Click config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by click configure 2.0.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --with-linux=/root/linux-2.6.34.12 --prefix=/usr --enable-all-elements
## --------- ##
## Platform. ##
@shoban
shoban / click-kp.log
Created September 18, 2012 06:35
Click related kernel panic
[ 136.891896] click module exiting
[ 142.849335] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 142.849350] IP: [<(null)>] (null)
[ 142.849356] PGD 0
[ 142.849361] Oops: 0010 [#1] SMP
[ 142.849367] last sysfs file: /sys/devices/virtual/net/fake0/uevent
[ 142.849374] CPU 0
[ 142.849377] Modules linked in: click proclikefs nfsd exportfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc lp parport [last unloaded: click]
[ 142.849403]
[ 142.849408] Pid: 1, comm: init Tainted: G W 2.6.34.12-click #1 /
@shoban
shoban / chromescrobbler-pandora.patch
Created February 25, 2011 17:37
Patch for scrobbling songs played on Pandora.
diff --git a/chromescrobbler.js b/chromescrobbler.js
index 13f59d1..ce18132 100644
--- a/chromescrobbler.js
+++ b/chromescrobbler.js
@@ -5,6 +5,7 @@ var nowPlayingURL = "http://post.audioscrobbler.com:80/np_1.2";
var submissionURL = "http://post2.audioscrobbler.com:80/protocol_1.2";
function handshake() {
+ console.log('handshake(): ');
var username = localStorage.username;
@shoban
shoban / mount-mon.c
Created February 21, 2011 19:53
Monitor for changes in mount points via /proc/mounts
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#define MOUNT_PROC "/proc/mounts"