Skip to content

Instantly share code, notes, and snippets.

View hrj's full-sized avatar
🔭
observing

hrj hrj

🔭
observing
View GitHub Profile
@hrj
hrj / gist:643612
Created October 24, 2010 15:36
Before
<uses-sdk minSdkVersion="7" targetSdkVersion="7"/>
@hrj
hrj / SampleSurface.scala
Created September 9, 2011 15:44
Sample SurfacePlotter program
// Quick demo of SurfacePlotter [ http://code.google.com/p/surfaceplotter ]
import scala.swing._
import net.ericaro.surfaceplotter.{ProgressiveSurfaceModel, JSurfacePanel, Mapper}
val model = new ProgressiveSurfaceModel
val surfacePanel = new JSurfacePanel
surfacePanel.setModel(model)
model.setMapper(new Mapper {
@hrj
hrj / build.sbt
Created July 6, 2012 19:21
SBT with Jetty 8.1.x gives an error. For xsbt bug #499
name := "sbt-jetty-test"
scalaVersion := "2.9.2"
libraryDependencies ++= Seq(
"org.eclipse.jetty" % "jetty-webapp" % "8.1.4.v20120524" artifacts (Artifact("jetty-webapp", "jar", "jar"))
)
classpathTypes ~= (_ + "orbit")
@hrj
hrj / embed.html
Created January 22, 2013 03:39
rvl.io embed example
<html>
<body>
<h1>Embed demo</h1>
<iframe src="http://www.rvl.io/hakim/theming/embed/"></iframe>
</body>
</html>
@hrj
hrj / output.xml
Created March 5, 2013 12:32
Ledger xml output
<?xml version="1.0" encoding="utf-8"?>
<ledger version="196608">
<commodities>
<commodity flags="P">
<symbol/>
</commodity>
</commodities>
<accounts>
<account id="09b3aeb0">
<name/><fullname/>
@hrj
hrj / xoria256.vim
Created July 11, 2013 05:45
Higher contrast version of xoria256.vim
" Vim color file
"
" Name: xoria256.vim
" Version: 1.5
" Maintainer: Dmitriy Y. Zotikov (xio) <xio@ungrund.org>
"
" Should work in recent 256 color terminals. 88-color terms like urxvt are
" NOT supported.
"
" Don't forget to install 'ncurses-term' and set TERM to xterm-256color or

LogShark is a simple utility to collect logs from an Android device using a PC.

I created this to help Android developers collect information from their app's users. This information can be very useful for debugging purposes.

From Android version 4.1 (Jelly Bean) onwards, it has become difficult to collect this information through the device itself. Hence the need for an app that runs on the PC.

Note that the collection of information is entirely voluntary. Moreover, the user can (and should) review the information before sending it to developers or other people.

Pre-requisites

@hrj
hrj / brainerd.py
Last active December 20, 2015 20:38 — forked from asmallteapot/brainerd.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
from flask import Flask, redirect, url_for
from markdown import markdown
import os
import re
# create the app
# TODO: load config/template from files, with fallbacks
@hrj
hrj / matcher.scala
Created August 16, 2013 10:44
Example matcher using Scala Test
def beEqui(to: collection.GenSeq[xml.Node]) = new Matcher[collection.GenSeq[xml.Node]] {
def apply(left: collection.GenSeq[xml.Node]) = {
val flatLeft = flatten(left)
val flatTo = flatten(to)
MatchResult(
flatLeft == flatten(to),
"xmls were not equivalent:\n%s and\n%s" format (flatLeft, flatTo),
"xmls were equivalent:\n%s and\n%s" format (flatLeft, flatTo))
}
@hrj
hrj / calib.sh
Created September 14, 2013 11:28
Script to add red tint to the entire screen.
#!/bin/bash
# Call with a percentage value from 0 to 100
# 0 means only red, 50 means half of green and blue is shown through
# if you don't give any arguments the calibration is cleared
if [[ -z "$1" ]]; then
echo Clearing all calibrations
xcalib -clear
else