This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
def toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |
class Integer | |
N_BYTES = [42].pack('i').size | |
N_BITS = N_BYTES * 16 | |
MAX = 2 ** (N_BITS - 2) - 1 | |
MIN = -MAX - 1 | |
end | |
p Integer::MAX #=> 4611686018427387903 | |
p Integer::MAX.class #=> Fixnum | |
p (Integer::MAX + 1).class #=> Bignum |
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
diskutil erasevolume HFS+ "diskname" `hdiutil attach -nomount ram://2048` | |
#The line above mounts disk with name "diskname" and with size of 2048 blocks (~1 MB) | |
#More info: http://osxdaily.com/2007/03/23/create-a-ram-disk-in-mac-os-x/ | |
#Convert blocks to megabytes and vise versa - http://www.unitconversion.org/data-storage/blocks-to-megabytes-conversion.html | |
#Note: Disk will be unmounted and all data will be lost on: empty battery, system reboot. | |
#How to save data on RAM disk on reboot, sleep or empty battery: http://puregin.org/setting-up-a-persistent-ramdisk-on-MacOS |
TextView tv = (TextView)findViewById(R.id.mytextview); | |
Spanned myStringSpanned = Html.fromHtml(myString, null, null); | |
tv.setText(myStringSpanned, TextView.BufferType.SPANNABLE); | |
Supporte TAGS on Android 2.1 | |
<a href="..."> | |
<b> | |
<big> | |
<blockquote> | |
<br> |
public class SomeFragment extends Fragment { | |
MapView mapView; | |
GoogleMap map; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View v = inflater.inflate(R.layout.some_layout, container, false); | |
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff |
module ActiveAdmin | |
class ResourceDSL | |
def filter(*args) | |
field = args[0] | |
klass = @config.resource_class_name.constantize | |
type = klass.columns.select{|c| c.name == field.to_s}.first.try(:type) | |
if type == :datetime | |
controller do | |
before_filter :only => :index do |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: