Skip to content

Instantly share code, notes, and snippets.

@jinqian
jinqian / gist:015cb4d6b6fcf1cc9896a290b3309c8a
Created July 6, 2017 08:39 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@jinqian
jinqian / README.md
Created June 22, 2017 11:48 — forked from shekibobo/README.md
Android: Base Styles for Button (not provided by AppCompat)

How to create custom button styles using Android's AppCompat-v7:21

Introduction

AppCompat is an Android support library to provide backwards-compatible functionality for Material design patterns. It currently comes bundled with a set of styles in the Theme.AppCompat and Widget.AppCompat namespaces. However, there is a critical component missing which I would have thought essential to provide the a default from which we could inherit our styles: Widget.AppCompat.Button. Sure, there's Widget.AppCompat.Light.ActionButton, but that doesn't actually inherit from Widget.ActionButton, which does not inherit from Widget.Button, so we might get some unexpected behavior using that as our base button style, mainly because Widget.ActionButton strictly belongs in the ActionBar.

So, if we want to have a decently normal default button style related to AppCompat, we need to make it ourselves. Let's start by digging into the Android SDK to see how it's doing default styles.

Digging In

@jinqian
jinqian / DeCryptor.java
Created February 21, 2017 09:44 — forked from JosiasSena/DeCryptor.java
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
@jinqian
jinqian / release.gradle
Created February 14, 2017 21:47
Gradle Script for auto version incrementing, git tagging, and deploying to Beta by Crashlytics
/*
* Copyright © 52inc 2015.
* All rights reserved.
*/
apply plugin: 'org.ajoberstar.grgit'
import groovy.json.*
def versionFile = file("../version.json")