Skip to content

Instantly share code, notes, and snippets.

pablichjenkov pablichjenkov

  • NCLH
  • Miami, Fl
Block or report user

Report or block pablichjenkov

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
@orj
orj / .gitconfig
Created May 27, 2011
Using p4merge as Git mergetool on Mac OS X.
View .gitconfig
[merge]
keepBackup = false
tool = custom
[mergetool "custom"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
@gpeal
gpeal / SimpleDemo.kt
Last active Aug 28, 2018
Airbnb MvRx Early Look
View SimpleDemo.kt
data class SimpleDemoState(val listing: Async<Listing> = Uninitialized)
class SimpleDemoViewModel(override val initialState: SimpleDemoState) : MvRxViewModel<SimpleDemoState>() {
init {
fetchListing()
}
private fun fetchListing() {
// This automatically fires off a request and maps its response to Async<Listing>
// which is a sealed class and can be: Unitialized, Loading, Success, and Fail.
@jieyu
jieyu / AndroidViewInvalidation.md
Created Mar 9, 2013
Describe how View.invalidate() is processed in Android to refresh a widget.
View AndroidViewInvalidation.md

How View.invalidate() is processed in Android

This document is based on the code of android-4.1.1_r6 (Jelly Bean).

First, the invalidate() call will be propagated back to the root of the view hierarchy. During the propagation, the system determines the dirty area that needs to be redrawn. The propagation will eventually reach ViewRootImpl.

frameworks/base/core/java/android/view/View.java

10219   void invalidate(boolean invalidateCache) {
...         ...
@swankjesse
swankjesse / QuotePreservingCookieJar.java
Created Oct 4, 2016
Like our JavaNetCookieJar, but preserve quote characters.
View QuotePreservingCookieJar.java
/*
* Copyright (C) 2016 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@elye
elye / Kotlin Date Iterator
Last active Feb 26, 2019
Kotlin Date Iterator
View Kotlin Date Iterator
class TestingClass {
fun testingFunction() {
for (everyday in this year 2017) {
// Do something with everyday
println(everyday.toString())
}
}
private infix fun year(year: Int): DateRange {
return Date(year, 1, 1)..Date(year, 12, 31)
View EventBus.java
import rx.Observable;
import rx.subjects.PublishSubject;
import rx.subjects.SerializedSubject;
import rx.subjects.Subject;
/**
* Simple pass-thru event bus with error handling and reconnect.
*/
public class EventBus {
@justasm
justasm / NonPersistentCookieJar.java
Last active Apr 21, 2019
OkHttp 3 non-persistent CookieJar with an ACCEPT_ALL policy
View NonPersistentCookieJar.java
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.HttpUrl;
@hameno
hameno / ExtendedFileProvider
Last active May 2, 2019
"Enhanced" FileProvider with support for external secondary paths (based on 27.0.2)
View ExtendedFileProvider
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@justinthomas-syncbak
justinthomas-syncbak / okhttp3.WebviewCookieHandler.java
Last active May 12, 2019
Cookie jar that handles syncing okhttp cookies with Webview cookie manager
View okhttp3.WebviewCookieHandler.java
MOVED TO https://gist.github.com/Jthomas54/2f34b8aea5b457db5459e2421deffd15
@ericwindmill
ericwindmill / form_page.dart
Created Apr 14, 2018
Flutter Simple inherited Widget Example
View form_page.dart
import 'package:flutter/material.dart';
import 'package:simple_inherit/state_container.dart';
class UpdateUserScreen extends StatelessWidget {
static final GlobalKey<FormState> formKey = new GlobalKey<FormState>();
static final GlobalKey<FormFieldState<String>> firstNameKey =
new GlobalKey<FormFieldState<String>>();
static final GlobalKey<FormFieldState<String>> lastNameKey =
new GlobalKey<FormFieldState<String>>();
static final GlobalKey<FormFieldState<String>> emailKey =
You can’t perform that action at this time.