Skip to content

Instantly share code, notes, and snippets.

View fnk0's full-sized avatar

Marcus Gabilheri fnk0

  • Snap
  • Los Angeles, CA
View GitHub Profile
@fnk0
fnk0 / Hex Color Values - Alpha
Created February 22, 2016 21:58
Hex values for transparency in hex values
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
@kaushikgopal
kaushikgopal / update.sh
Last active February 1, 2022 16:36
My morning cli ritual
echo "y" | android update sdk --no-ui; echo "yes" | apm upgrade; softwareupdate -i -a; brew update; brew upgrade; brew cleanup; brew cask cleanup; npm update npm -g; npm update -g; gem update
@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
@atoennis
atoennis / RetrofitModule.java
Last active August 29, 2015 14:21
How to build a Retrofit RestAdapter using Dagger2 dependency injection.
@Singleton
@Provides
CustomRequestInterceptor provideRequestInterceptor(final Application application, SharedPreferencesCookieStore cookieStore) {
return new CustomRequestInterceptor(application, cookieStore);
}
@Singleton
@Provides
RestAdapter provideRestAdapter(Client client, DynamicEndpoint endpoint,
Converter converter,
@billmote
billmote / AndroidManifest.xml
Last active October 15, 2023 10:48 — forked from JakeWharton/gist:f50f3b4d87e57d8e96e9
When pushing code from your IDE, wake the device and show the activity.
<?xml version="1.0" encoding="utf-8"?>
<!-- Add this as a debug manifest so the permissions won't be required by your production app -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
</manifest>
@billmote
billmote / EventBus.java
Last active August 29, 2015 14:09
Otto Bus wrapper that allows posting from any thread as well as unregistering without crashing for multiple calls to unregister.
public class EventBus {
private static final Handler mainThread = new Handler(Looper.getMainLooper());
private static EventBus mInstance;
private final Bus mBus;
@DebugLog
private EventBus() {
// Don't let this class get instantiated directly.
mBus = new Bus();
@gabrielemariotti
gabrielemariotti / Readme.md
Last active December 22, 2016 14:54
UndoBar with Material Design

These layouts provide a simple undo bar with Material Design.

This gist does not contain any Android L API.

undobar with action undobar mobile
Screen Screen
var paperHandler = function(event) {
if(!event.target.value) {
value = event.target.checked;
} else {
value = event.target.value;
}
$scope.$apply(function() {
$scope.workOrder[event.target.getAttribute("ng-model")] = value;
});
@gabrielemariotti
gabrielemariotti / README.md
Last active August 29, 2015 14:05
Code for Taylor Ling's UI ANIMATION IN PHOTOSHOP – TUTORIAL #1
@staltz
staltz / introrx.md
Last active April 15, 2024 10:24
The introduction to Reactive Programming you've been missing