Skip to content

Instantly share code, notes, and snippets.

View krebernisak's full-sized avatar
🎯
Focusing

Kristijan Rebernisak krebernisak

🎯
Focusing
View GitHub Profile
{ chart: { backgroundColor: 'transparent' },
credits: { enabled: false },
title: { style: { color: '#fff' }, text: 'Content Import SE' },
xAxis: [ { type: 'datetime', tickInterval: 1209600000 } ],
yAxis:
[ { title: { text: 'Time' }, min: 0 },
{ gridLineWidth: 0,
title: { text: 'Total', style: { color: '#72919A' } },
labels: { format: '{value}%', style: { color: '#72919A' } },
min: 0,
@krebernisak
krebernisak / RxFirebase.java
Last active November 23, 2015 11:05 — forked from gsoltis/RxFirebase.java
RxJava Bindings for Firebase
package com.firebase.client;
import com.firebase.client.AuthData;
import com.firebase.client.ChildEventListener;
import com.firebase.client.DataSnapshot;
import com.firebase.client.Firebase;
import com.firebase.client.FirebaseError;
import com.firebase.client.Query;
import com.firebase.client.ValueEventListener;
import com.firebase.client.core.view.Event;
@krebernisak
krebernisak / Wireless ADB
Created May 22, 2013 13:24
Connect to Android with ADB over TCP
#From a command line on the computer that has the device connected via USB, issue the commands
adb tcpip 5555
adb connect <device-ip>:5555
#To tell the ADB daemon return to listening over USB
adb usb
@krebernisak
krebernisak / Generate RSA key
Created May 22, 2013 13:32
Generate a new keystore
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000
@krebernisak
krebernisak / git files changed between tags
Created September 25, 2013 10:03
Search for files between two tags/commits
git diff --name-status [TAG1]..[TAG2] | grep -e [PATTERN]
@krebernisak
krebernisak / gut daemon
Created September 25, 2013 10:07
Start a git daemon
git daemon --reuseaddr --base-path=. --export-all --verbose
git clone git://[ip_addr]/ dir
@krebernisak
krebernisak / APK debugging
Created September 25, 2013 13:35
Get the packaged app config info
aapt dump badging <my_apk.apk>
function youtube_parser(url) {
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
var match = url.match(regExp);
if (match && match[7].length === 11) {
return match[7];
} else {
alert("Url incorrecta");
}
}
@krebernisak
krebernisak / argv.py
Created November 11, 2013 19:11
Python argument list manipulation
#!/usr/bin/env python
import sys
# Get the total number of args passed to the demo.py
total = len(sys.argv)
# Get the arguments list
cmdargs = str(sys.argv)
@krebernisak
krebernisak / open_file.py
Created November 11, 2013 19:08
Open file and readlines
with open(fname) as f:
content = f.readlines()