Skip to content

Instantly share code, notes, and snippets.

View intrications's full-sized avatar

Michael Basil intrications

View GitHub Profile
@sheerazam
sheerazam / ArcUtils.java
Created October 6, 2016 11:22
Fresco Circular Progress Drawable
public final class ArcUtils {
private static final double FULL_CIRCLE_RADIANS = toRadians(360d);
private ArcUtils() { }
/**
* Draws a circular arc on the given {@code Canvas}.
*
* @param canvas The canvas to draw into.
* @param circleCenter The center of the circle on which to draw the arc.
#
# Circle CI & gradle.properties live in harmony
#
# Android convention is to store your API keys in a local, non-versioned
# gradle.properties file. Circle CI doesn't allow users to upload pre-populated
# gradle.properties files to store this secret information, but instaed allows
# users to store such information as environment variables.
#
# This script creates a local gradle.properties file on current the Circle CI
# instance. It then reads environment variable TEST_API_KEY_ENV_VAR which a user
@mcky
mcky / mondo.30m.sh
Created February 1, 2016 05:55
mondo bitbar
#!/bin/bash
# Requires:
# - mondo-bank (`npm install mondo-bank -g`)
# - jq (`brew install jq`)
export PATH="/usr/local/bin:/usr/bin/:$PATH";
JSON=$(mondo balance --account_id=YOURID)
BALANCE=$(echo $JSON | jq '.balance' | awk '{print "£"$1/100}')
SPENT=$(echo $JSON | jq '.spend_today' | awk '{print "£"$1/100}')
@johan
johan / JSXTransformer.min.js
Last active August 8, 2023 22:57
Week Calendar of Life
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){"use strict";var ReactTools=_dereq_("../main");var inlineSourceMap=_dereq_("./inline-source-map");var headEl;var dummyAnchor;var inlineScriptCount=0;var supportsAccessors=Obj
@FireZenk
FireZenk / SnackbarAnimation.java
Last active August 11, 2020 13:06
With this class you can clone the {Snackbar} animation to move the {ViewGroup} above of the Snackbar when it is visible and avoid view overlapping (clone of fab animation)
package com.your.package;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.view.ViewGroup;
import com.daimajia.easing.BaseEasingMethod;
import com.daimajia.easing.Glider;
import com.daimajia.easing.Skill;
import com.nineoldandroids.animation.AnimatorSet;
@TheReprator
TheReprator / LineThroughTextView.java
Last active October 16, 2015 06:31 — forked from longkai/LineThroughTextView.java
A simple line through text view. ie. ----------------- Hello, World --------------
package views;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Build;
import android.text.TextUtils;
@StefMa
StefMa / README.md
Created July 8, 2015 11:04
TextInputLayoutWrapperView

TextInputLayoutWrapperView


What is it?

This is a simple wrapper View for the new TextInputLayout from Design Library.


Why?

Normaly you use the TextInputLayout like this

@rock3r
rock3r / giffify.py
Last active January 14, 2022 09:00
Giffify - easily create optimised GIFs from a video
#!/usr/bin/python
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
import argparse, sys, subprocess, tempfile
@iPaulPro
iPaulPro / include_list_viewpager.xml
Last active March 7, 2024 11:13
CollapsingToolbarLayout with TabLayout
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2015 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
@Takhion
Takhion / styles.xml
Created June 3, 2015 15:16
Custom dialog Activity style
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="CustomDialog" parent="@style/Base.Theme.AppCompat.Light.Dialog.FixedSize">
<item name="android:windowCloseOnTouchOutside">false</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowClipToOutline">false</item>