Skip to content

Instantly share code, notes, and snippets.

@jsutlovic
jsutlovic / adb.log
Created February 6, 2014 20:05
TF101 crash
02-06 19:56:14.020 4895-4953/com.tophat.android.app A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000020 (code=1)
02-06 19:56:14.520 4586-4586/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-06 19:56:14.520 4586-4586/? I/DEBUG﹕ Build fingerprint: 'asus/US_epad/TF101:4.0.3/IML74K/US_epad-9.2.1.27-20120615:user/release-keys'
02-06 19:56:14.520 4586-4586/? I/DEBUG﹕ pid: 4895, tid: 4953 >>> com.tophat.android.app <<<
02-06 19:56:14.520 4586-4586/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000020
02-06 19:56:14.520 4586-4586/? I/DEBUG﹕ r0 01e32790 r1 00000000 r2 01df0210 r3 00000020
02-06 19:56:14.530 4586-4586/? I/DEBUG﹕ r4 01df0210 r5 01b296b8 r6 00000007 r7 5ce7fe0c
02-06 19:56:14.530 4586-4586/? I/DEBUG﹕ r8 5d05ec10 r9 5ce7fe04 10 00000000 fp 5d05ec24
02-06 19:56:14.530 4586-4586/? I/DEBUG﹕ ip 5a117cad sp 5d05ec08 lr 5a117cbb pc 5a2379a4 cpsr 80003430
02-06 19:56:14.530 4586-4586/? I/DEBUG﹕ d0 406f300000000000 d1 3ff
@jsutlovic
jsutlovic / headers.java
Created November 27, 2013 05:44
Example HTTP Headers for Java
HttpHeaders headers = request.getHeaders();
headers.setAcceptEncoding( ContentCodingType.GZIP );
headers.set("Accept", "*/*");
headers.setUserAgent("Some agent");
headers.setContentType(new MediaType("application","json"));
return request;
@jsutlovic
jsutlovic / xbindkeysrc.scm
Created November 19, 2013 06:37
XBindKeys config for G500 (programmed with Logitech Gaming Software from OS X) and media keys to control Banshee
;; run a command if two keys are pressed at the same time
(define (define-mouse-keys key1 key2 rel cmd1)
"Define multi keys"
(let ((k1 #f) (k2 #f))
(xbindkey-function key1
(lambda()
(if (not k1)
(ungrab-all-keys))
(set! k1 #t)))
(xbindkey-function (cons 'release key1)
@jsutlovic
jsutlovic / Test1.java
Created November 12, 2013 17:31
Java Tests
public class Test1 {
public static void main(String[] args) {
System.out.println("Test a:");
Object a = 1;
System.out.println(a.toString());
System.out.println(a.getClass().getName());
System.out.println("Test b:");
Object b = 2;
System.out.println(String.format("%s", b));
@jsutlovic
jsutlovic / deftest.sublime-snippet
Created October 18, 2013 19:20
ST2 snippet to automate creation of test methods for Python's unittest
<snippet>
<tabTrigger>deft</tabTrigger>
<scope>source.python</scope>
<description>Test Method</description>
<content><![CDATA[def test_${1:function}(self):
"""
${2}
"""
self.fail('${0:Not Implemented}')]]></content>
@jsutlovic
jsutlovic / fl_vs_dec.ipnb
Last active December 25, 2015 19:19
Python Float vs Decimal
{
"metadata": {
"name": "Float vs Decimal"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
<snippet>
<content><![CDATA[
import ipdb; ipdb.set_trace()
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<tabTrigger>ipdb</tabTrigger>
<scope>source.python</scope>
@jsutlovic
jsutlovic / Asterank_test.kml
Last active December 16, 2015 11:19
Asterank KML test
<?xml version="1.0" encoding="UTF-8"?>
<kml hint="target=sky" xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>Some asteroid</name>
<Point>
<coordinates>2.207589,-5.661244,0</coordinates>
</Point>
</Placemark>
<GroundOverlay>
@jsutlovic
jsutlovic / blackboardish.vim
Created January 29, 2013 03:54
Vim colours
" Vim color file
" Original Maintainer: Lars H. Nielsen (dengmao@gmail.com)
" Last Change: 2010-07-23
"
" Modified version of wombat for 256-color terminals by
" David Liang (bmdavll@gmail.com)
" based on version by
" Danila Bespalov (danila.bespalov@gmail.com)
set background=dark
@jsutlovic
jsutlovic / sublime-settings.json
Created December 16, 2012 20:18
Sublime settings
{
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme",
"font_size": 12.0,
"ignored_packages":
[
"Vintage",
"SublimeRope"
],
"open_files_in_new_window": false,
"scroll_past_end": true,