View python3_http_simple_server.py
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse
import subprocess
class GetHandler(BaseHTTPRequestHandler):
ls_l_cmd = ['ls','-l']
def do_GET(self):
parsed_path = urlparse(self.path)
View app build.gradle
apply plugin: 'com.android.application'
apply from: 'nonnull.gradle'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
[...]
}
View nonnull.gradle
/**
* File: nonnull.gradle
*
* Generates package-info.java for appropriate packages
* inside src/main/java folder.
*
* This is a workaround to define @ParametersAreNonnullByDefault for all Java classes in a package
* i.e. including all subpackages (note: edit line no. 19).
*/
task generateNonNullJavaFiles(dependsOn: "assembleDebug", type: Copy) {
View karabiner.json
#save this file under: ~/.karabiner.d/configuration/karabiner.json
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"right_command": "right_option",
"right_option": "right_command"
View proguard-rules.pro
#build.gradle
#
# compile 'io.reactivex:rxandroid:1.0.1'
# compile 'io.reactivex:rxjava:1.0.14'
# compile 'io.reactivex:rxjava-math:1.0.0'
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0'
# rxjava
-keep class rx.schedulers.Schedulers {
public static <methods>;
View gist:eec35300b92d8a3e92a9
Edit->Find->Find in path
Custom -> ... -> Add scope
search pattern:
file:*java&&!file:*R.java*&&!file:*_.java||file:*strings.xml||file:*dimes.xml||file:*styles.xml||file:*attrs.xml||file:*colors.xml||file:*layout/*xml&&!file:*build/*xml
<component name="DependencyValidationManager"><scope name="PekaJavaWithoutRWithStrings" pattern="file:*java&&!file:*R.java*&&!file:*_.java||file:*strings.xml||file:*dimes.xml||file:*styles.xml||file:*attrs.xml||file:*colors.xml||file:*layout/*xml&&!file:*build/*xml"/></component>
View setup_howto.txt
# author:
# @Bartosz Kosarzycki
#
sudo apt-get install npm
sudo npm install -g react-native-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /home/user/your/project/path
react-native init AwesomeProject
cd AwesomeProject
View HowTo.txt
Prerequisite: Install docker
> docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64
View DoubleClickListenerImageButton.java
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageButton;
/**
* Created by kosiara on 9/20/15.
*/
View HowToInstallGPOnAnEmulator.txt
1. Download Google Apps from basketbuild.com:
https://basketbuild.com/gapps
2. Extract GPE services apk files from the zip:
unzip -j gapps-lp-20150222-signed.zip system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk system/priv-app/GoogleLoginService/GoogleLoginService.apk system/priv-app/Phonesky/Phonesky.apk system/priv-app/GmsCore/GmsCore.apk -d ./
3. Start the emulator with the command:
/home/path/to/your/android/Sdk/tools/emulator -no-boot-anim -netdelay none -netspeed full -avd YOUR_EMULATOR_NAME