Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am nilzor on github.
  • I am frodenilsen ( on keybase.
  • I have a public key ASAl5OwmAffcKHYFXAub-yC-Z2TP1v9XlbbFy70Qtt55eAo

To claim this, I am signing this object:

View debug.log
Android application is debugging.
Loaded assembly: /storage/emulated/0/Android/data/xam_android_news.xam_android_news/files/.__override__/xam-android-news.dll
Loaded assembly: /storage/emulated/0/Android/data/xam_android_news.xam_android_news/files/.__override__/RestSharp.dll [External]
Loaded assembly: Mono.Android.dll [External]
Loaded assembly: Java.Interop.dll [External]
Loaded assembly: System.Runtime.dll [External]
Loaded assembly: System.Collections.Concurrent.dll [External]
09-09 13:59:37.789 I/art ( 3889): Not late-enabling -Xcheck:jni (already on)
09-09 13:59:37.789 W/art ( 3889): Unexpected CPU variant for X86 using defaults: x86
09-09 13:59:37.828 W/monodroid( 3889): Creating public update directory: `/data/user/0/xam_android_news.xam_android_news/files/.__override__`
View bash.rc
And-Screenshot() {
# Todo: Add demo mode:
if [ "$1" = "" ] ; then echo "Specify output file name"
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
if [ "$PCT" = "" ]; then PCT=33%; fi
convert screen.png -resize $PCT $1
  • sudo apt-get install php5-xdebug
  • "PHP Web Application" run configuration backed by a "PHP Server" with XDebug set up. Run in debug mode.
  • This at the end of /etc/php5/apache2/
curl -I ';adfibeg=0;cdata=BrHTQUfSbdPfs5ZCfJ32id3uF0FxvvzX9DxWEU-biQUlI0uGMmq9cwXtoBuHWFajy0ZLabVcrmPXHUiMkqf858rncRr8QBzgw3iI60gHGBc1;;;C=1' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-GB,en-US;q=0.8,en;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,applicatio
View AsyncPatterns.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsyncPatterns
class Program
View mobile-page-template.html
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
View AutoNamingReducer.js
* A base class for generating Redux Actions for functions
* by introspecting and naming the action after the class and function name
export class AutoNamingReducer {
/** Generates and returns a Redux Action for the specified function. Function must reside in a class
* extending AutoNamingReducer
* @param func {function} A function reference
* @param params {object} An optional parameter object which will be spliced with the action object and passed
* This class is an adapter for Retrofit allowing you to use ion/andorid-async with Retrofix 1.x.
* Since retrofit is inherently synchronous under the hood, adding this adapter unfortunately does not
* yield a smaller thread footprint. -Notice the .get() blocking call in the code below.
* So why would you use this? My use case is that we rely on third party libraries that requre Retrofit.
* To get all our HTTP comms to go through the same logic we use this adapter.
* That gives us zero dependencies to apache-http-client or okhttp.
* ion home:
import android.databinding.BaseObservable;
import android.databinding.BindingAdapter;
import android.databinding.BindingConversion;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;