Skip to content

Instantly share code, notes, and snippets.

$ git config --global url."git@bitbucket.org:".insteadOf "https://bitbucket.org/"
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
@AKosterin
AKosterin / gist:280dc28ccb451156a9725f7c3e6bf669
Created February 20, 2017 10:04 — forked from iwinux/gist:5578188
Go's html/template with better subdirectory support.
package templates
import(
"html/template"
"io"
"os"
"strings"
"path/filepath"
)
import rx.Observable;
import rx.subjects.PublishSubject;
public class Property<T> {
private T value;
private PublishSubject<T> property;
public Property() {
property = PublishSubject.create();
@AKosterin
AKosterin / themes-debug.xml
Created January 24, 2016 09:56 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
@AKosterin
AKosterin / CurlLoggingInterceptor.java
Created January 18, 2016 09:35 — forked from jgilfelt/CurlLoggingInterceptor.java
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* 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
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="material_red50">#ffffebee</color>
<color name="material_red100">#ffffcdd2</color>
<color name="material_red200">#ffef9a9a</color>
<color name="material_red300">#ffe57373</color>
<color name="material_red400">#ffef5350</color>
<color name="material_red500">#fff44336</color>
<color name="material_red600">#ffe53935</color>
<color name="material_red700">#ffd32f2f</color>