This file contains hidden or 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 [email protected] | |
| var destination = null; | |
| var useClone = false; | |
| var cloneSource = null; | |
| var cloneDelay = 1000; | |
| function hookInputs() { | |
| var frame = document.getElementById('overlayFrame'); | |
| var keyPressScript = |
This file contains hidden or 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 hidden or 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
| #!/bin/sh | |
| # | |
| # An example hook script to verify what is about to be committed. | |
| # Called by "git commit" with no arguments. The hook should | |
| # exit with non-zero status after issuing an appropriate message if | |
| # it wants to stop the commit. | |
| # | |
| # Usage: | |
| # Remove the .sh file extension when you put the script in your hooks folder! | |
| # |
This file contains hidden or 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/env php | |
| <?php | |
| $unallowed = array( | |
| ); | |
| exec('git diff --cached --', $output); | |
This file contains hidden or 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
| // by alex evans, 2011. released into the public domain. | |
| // based on a first ever reading of the png spec, it occurs to me that a minimal png encoder should be quite simple. | |
| // this is a first stab - may be buggy! the only external dependency is zlib and some basic typedefs (u32, u8) | |
| // | |
| // VERSION 0.02! now using zlib's crc rather than my own, and avoiding a memcpy and memory scribbler in the old one | |
| // by passing the zero byte at the start of the scanline to zlib first, then the original scanline in place. WIN! | |
| // | |
| // more context at http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. | |
| // | |
| // follow me on twitter @mmalex http://twitter.com/mmalex |
This file contains hidden or 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 hidden or 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
| // Talk and slides: https://speakerdeck.com/nhachicha/droidcon-sf-advanced-techniques-for-concurrency-and-memory-management | |
| // ********************************************************************* // | |
| // ************************** CountDownLatch ************************** // | |
| // ********************************************************************* // | |
| public class RandomIntAverage { | |
| CountDownLatch controller = new CountDownLatch(NB_THREADS); | |
| public void randomIntAvg() throws InterruptedException { | |
| for (int i = 0; i < NB_THREADS; i++) { |
This file contains hidden or 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
| // Talk and slides: https://speakerdeck.com/nhachicha/droidcon-sf-advanced-techniques-for-concurrency-and-memory-management | |
| static class Activity { | |
| interface Listener {} | |
| Service service; | |
| Activity(Service service) { | |
| this.service = service; | |
| } | |
| void onStart() { | |
| service.registerListener(new Listener() {});//Listener hold a reference to Activity |
This file contains hidden or 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 hidden or 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
| ^(?!(NotificationManager|Timeline|SensorManager|Configs|libc-netbsd|art|stetho|Choreographer|CliptrayUtils|BubblePopupHelper|ViewRootImpl|libEGL|System.out|PhoneWindow)) |
OlderNewer