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 / main.dart
Created Sep 2, 2018
Flutter portrait only
View main.dart
void main() {
.then((_) {
runApp(new MyApp());
kosiara /
Last active Sep 1, 2018
proguard rules for Twitter UI
# Twitter core rules
-keepattributes *Annotation* #GSON
-dontwarn java.nio.file.** #Okio
-dontwarn org.codehaus.mojo.animal_sniffer.** #Okio
-dontwarn javax.annotation.* #Okio
-dontwarn javax.annotation.concurrent.* #Okio
-dontnote retrofit2.Platform #Retrofit 2
-dontnote retrofit2.Platform$IOS$MainThreadExecutor #Retrofit 2
-dontwarn retrofit2.Platform$Java8 #Retrofit 2
-keepattributes Signature #Retrofit 2
kosiara / TwitterViewComponent.kt
Last active Aug 30, 2018
Custom Twitter TweetView Style
View TwitterViewComponent.kt
override fun success(result: Result<Tweet>?) {
val tweet = result!!.data
componentInstance.addView(TweetView(componentInstance.context, tweet,
kosiara / TweetViewUtil.kt
Last active Aug 30, 2018
Reformat Twitter date
View TweetViewUtil.kt
* Reformat Twitter date to a new pattern
fun TweetView.reformatDate(newDatePattern: String) {
val twitterDatePattern = "EEE MMM dd HH:mm:ss Z yyyy" // Mon Apr 21 04:08:37 +0000 2018
val dateTextView = findViewById<AppCompatTextView>(
dateTextView.text = parseDate(tweet.createdAt, twitterDatePattern).format(newDatePattern)
View item_list_twitter_comment.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android=""
type="" />
kosiara / TwitterViewComponent.kt
Created Aug 30, 2018
TwitterViewComponent - simple
View TwitterViewComponent.kt
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 / 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 / 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 / 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"
You can’t perform that action at this time.