Skip to content

Instantly share code, notes, and snippets.

Bartosz Kosarzycki kosiara

Block or report user

Report or block kosiara

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kosiara / AndroidManifest.xml
Created Mar 21, 2015
Add Android Annotations to project
View AndroidManifest.xml
<manifest xmlns:android=""
//change Activity class to generated class from AA
kosiara /
Created Mar 22, 2015
Android: Add scene transition animation to your project
public class ExplodeActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
kosiara /
Created Sep 20, 2015
multiple OnClickListeners in one Android control (java class)
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.
kosiara / HowTo.txt
Created Sep 22, 2015
Start Ubuntu docker image with a mounted directory
View HowTo.txt
Prerequisite: Install docker
> docker version
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
kosiara / karabiner.json
Created Sep 29, 2016
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"
kosiara / setup_howto.txt
Last active Apr 21, 2017
Setup Facebook React-native sample (empty) project on Ubuntu
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
kosiara / app build.gradle
Last active Apr 21, 2017
@ParametersAreNonnullByDefault for all subpackages includes src, test and androidTest
View app build.gradle
apply plugin: ''
apply from: 'nonnull.gradle'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
kosiara /
Created Sep 21, 2017
Simple Python3 HTTP Server; one-line python GET method
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)
kosiara / nonnull.gradle
Last active Feb 11, 2018
@ParametersAreNonnullByDefault for all subpackages
View nonnull.gradle
* File: nonnull.gradle
* Generates 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) {
kosiara /
Created Jul 21, 2014
Android slf4j logger with logcat + file; logging to file and logcat on Android
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class InitActivity {
public InitActivity() {
logger.debug("Activity loading....");
You can’t perform that action at this time.