This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package be.brol | |
import android.os.Binder | |
import android.os.Bundle | |
import android.support.v4.app.BundleCompat | |
import android.support.v4.app.Fragment | |
/** | |
* Eases the Fragment.newInstance ceremony by marking the fragment's args with this delegate | |
* Just write the property in newInstance and read it like any other property after the fragment has been created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cwebp -pass 10 -mt -alpha_filter best -alpha_cleanup -m 6 -lossless | |
What do all these arguments do? | |
-pass 10 Determines the number of passes that will be performed on the image, maximum 10. More = longer processing time, but potentially smaller images. Yum. | |
-mt Use multi-threading | |
-alpha_filter best "predictive filtering for alpha plane", tries to optimize the alpha channel. Options are none, fast, and best. | |
-m 6 Determines compression method. 0=fast, 6=slowest | |
-lossless Makes this WebP lossless. Image produced will be 100% identical once decompressed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.electricobjects.client.onboarding; | |
import android.app.Dialog; | |
import android.os.Bundle; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.v4.content.ContextCompat; | |
import android.view.Gravity; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
tell application "Google Chrome" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Chrome" | |
try | |
repeat with x from 1 to (count windows) | |
get properties of window x | |
set position of window x to {0, 21} | |
set size of window x to {1280, 709} | |
end repeat | |
end try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright John Leitch 2010 john.leitch5@gmail.com | |
var destination = null; | |
var useClone = false; | |
var cloneSource = null; | |
var cloneDelay = 1000; | |
function hookInputs() { | |
var frame = document.getElementById('overlayFrame'); | |
var keyPressScript = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Steve Jenkins' E4200 v1 Speed Optimizations | |
## Can be used on any Broadcom-based DD-WRT device | |
## PLEASE READ: http://wp.me/p1iGgP-DW | |
## Have fun, but use and tweak at your own risk :) | |
## Updated Feb 4, 2016 | |
## INITIAL SLEEP COMMAND | |
## First command in script is ignored in some builds, so this is a throw-away | |
sleep 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
All Clickable Views: | |
----------- | |
* ripple effect (Lollipop only) -- "colorControlHighlight" | |
Status Bar: | |
------------ | |
* background (Lollipop only) - "colorPrimaryDark" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.ref.WeakReference; | |
import android.text.SpannableStringBuilder; | |
import android.text.Spanned; | |
import android.text.TextUtils; | |
import android.widget.TextView; | |
public final class JumpingBeans { | |
/** | |
* The default fraction of the whole animation time spent actually animating. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
import argparse | |
import os.path | |
import glob | |
parser = argparse.ArgumentParser( | |
formatter_class=argparse.RawDescriptionHelpFormatter, | |
description='''\ | |
Replacing values in arrays.xml with @string/ links. Generates three new files for each locale: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Chris Banes | |
* | |
* 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 |
NewerOlder