Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| # Do you use boto3 or botocore? Want to capture and inspect your AWS API | |
| # traffic? This script will send all AWS API traffic to a Runscope bucket for | |
| # analysis and debugging. | |
| # | |
| # Instructions: | |
| # 1. Sign up for an account at https://www.runscope.com if you don't already | |
| # have one. | |
| # 2. Your account will have a single bucket. Get the Bucket Key from Runscope's | |
| # Traffic Inspector tab; paste that into the RUNSCOPE_BUCKET_KEY constant. | |
| # 3. Go to https://www.runscope.com/applications and create a new application. |
Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| package com.your.package; | |
| import android.content.ComponentName; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.ResolveInfo; | |
| import android.database.DataSetObservable; | |
| import android.os.AsyncTask; | |
| import android.os.Build; | |
| import android.text.TextUtils; |
| #! /usr/bin/env python3 | |
| """cheat_downloader.py | |
| Loads Chrome's cookies into Python Requests for bulk downloading. | |
| http://n8henrie.com/2013/11/use-chromes-cookies-for-easier-downloading-with-python-requests/ | |
| Working with: | |
| - Python 3.3.2 | |
| - BeautifulSoup 4.3.1 | |
| - Requests 2.0.0 | |
| - Chrome 30.0.1599.101 |
| // Usage: | |
| // blacklist | |
| String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
| // your share intent | |
| Intent intent = new Intent(Intent.ACTION_SEND); | |
| intent.setType("text/plain"); | |
| intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
| intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
| // ... anything else you want to add | |
| // invoke custom chooser |
| package your.awesome.app; | |
| import android.graphics.Bitmap; | |
| import android.support.v4.util.LruCache; | |
| import com.android.volley.toolbox.ImageLoader.ImageCache; | |
| public class LruBitmapCache extends LruCache<String, Bitmap> implements ImageCache { | |
| public LruBitmapCache(int maxSize) { | |
| super(maxSize); |
| import com.google.gson.Gson; | |
| import com.google.gson.JsonSyntaxException; | |
| import com.android.volley.AuthFailureError; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.ParseError; | |
| import com.android.volley.Request; | |
| import com.android.volley.Response; | |
| import com.android.volley.Response.ErrorListener; | |
| import com.android.volley.Response.Listener; |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |