- Open Android Studio
- Go to: Tools > Create Command-line Launcher
- Leave as default, Press OK
- Add the following lines to your
.gitconfig
import app.cash.sqldelight.async.coroutines.awaitQuery | |
import app.cash.sqldelight.db.SqlDriver | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.withContext | |
/** | |
* Describes contents of all tables in a database. | |
*/ | |
data class DatabaseContents( | |
val tables: List<TableContents>, |
# This file is located in "robot" folder | |
*** Settings *** | |
Documentation CommonResource file with KWs | |
Library OperatingSystem | |
*** Variables *** | |
${SRC_PATH} ../../src/ | |
*** Keywords *** |
// Located in kotlin/com.example | |
package com.example | |
class Bar { | |
fun bar() { | |
Foo.doSomething() | |
// Lint complaining that "This method should only be accessed from tests or within package private scope" even though it's the same package | |
} | |
} |
-Xms1G | |
-Xmx4G | |
-XX:MaxPermSize=2G | |
-XX:ReservedCodeCacheSize=240m | |
-XX:+UseCompressedOops | |
-XX:MetaspaceSize=512m |
#!/bin/bash | |
# Pull this file down, make it executable and run it with sudo | |
# wget https://gist.githubusercontent.com/kirillzh/8f7cf870d3e67c8840f445a9fa2203b4/raw/c95e5bbdf3bed52dd4fcd4716de0e149be99f6b7/build-erlang-18.3.sh | |
# chmod u+x build-erlang-18.3.sh | |
# sudo ./build-erlang-18.3.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install
will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
require 'active_support/core_ext/object/deep_dup.rb' | |
class Object | |
def deep_reject!(*keys) | |
if is_a?(Hash) | |
keys.each { |k| delete(k) } | |
values.each { |v| v.deep_reject!(*keys) } | |
elsif is_a?(Array) | |
each { |x| x.deep_reject!(*keys) } | |
end |
require 'typhoeus' | |
require 'json' | |
response = Typhoeus.get('https://ajax.googleapis.com/ajax/services/feed/load?num=50&q=http%3A%2F%2Fwww.google.com%2Ftrends%2Fhottrends%2Fatom%2Ffeed%3Fpn%3Dp1&v=1.0') | |
trends = JSON.parse(response.body)['responseData']['feed']['entries'].map { |x| x['title'] } | |
puts trends | |
#=> ["PGA Championship", "Note 5", "Donna Vekic", "Ruby Rose", "Left Handers Day", "PGA Tour", "James Harden", "China explosion", "Ariel Winter", "Jimmy Carter", "Tom Brady", "The Hateful Eight", "Fallout Shelter", "Kristen Stewart", "National Middle Child Day", "China", "Christina Aguilera", "Billy Joel", "Shade balls", "Meteor Shower"] |
def deep_reject!(hash, keys) | |
if hash.is_a?(Hash) | |
Array(keys).each { |k| hash.delete(k) } | |
hash.values.each { |v| deep_reject!(v, keys) } | |
elsif hash.is_a?(Array) | |
hash.each { |x| deep_reject!(x, keys) } | |
end | |
hash | |
end |