Android Studio keyboard shortcuts I use often.
SHIFT + F6
to refactor methods, classes, and variable namesCTRL + O
to override methodsCOMMAND + N
- Generate getter, setter, and constructor method for a class (when in editor pane)
<!-- country codes (ISO 3166) and Dial codes. --> | |
<select name="countryCode" id=""> | |
<option data-countryCode="GB" value="44" Selected>UK (+44)</option> | |
<option data-countryCode="US" value="1">USA (+1)</option> | |
<optgroup label="Other countries"> | |
<option data-countryCode="DZ" value="213">Algeria (+213)</option> | |
<option data-countryCode="AD" value="376">Andorra (+376)</option> | |
<option data-countryCode="AO" value="244">Angola (+244)</option> | |
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option> | |
<option data-countryCode="AG" value="1268">Antigua & Barbuda (+1268)</option> |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- | |
# Material Design Dimensions | |
These dimensions are provided as per Material Design Guidelines | |
to adhere to a 8 dp baseline grid. (With the exception of the | |
toolbar and notification bar.) | |
Using these dimensions lessens the use of arbitrary dimension |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done |
// MapAdjust.java | |
// Based on adjust.py | |
// Gatubit <[email protected]> | |
// https://gist.github.com/astrocosa/724526 | |
// Based on adjust.js | |
// Bratliff <[email protected]> | |
// http://www.polyarc.us/adjust.js |
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.util.*; | |
public class JsonHelper { | |
public static Object toJSON(Object object) throws JSONException { | |
if (object instanceof Map) { | |
JSONObject json = new JSONObject(); |
// I needed flatuicolors.com as Sass variables... | |
// In your console, run: | |
$('.color').get().map(function(el) { return "$" + el.classList[1] + ": " + el.getAttribute('data-clipboard-text') + ';' }).join('\r\n'); | |
// Output: | |
// $turquoise: #1abc9c; | |
// $emerland: #2ecc71; | |
// $peter-river: #3498db; | |
// $amethyst: #9b59b6; | |
// $wet-asphalt: #34495e; |
// Flat UI Color Palette | |
// by Rob Dunham http://robdunham.info/ | |
// colors taken from flatuicolors.com | |
// https://gist.github.com/Nilpo/344bcfb500907661ea9b | |
// flatuicolors.com | |
$fui-turquoise: #1abc9c; | |
$fui-green-sea: #16a085; | |
$fui-sun-flower: #f1c40f; | |
$fui-orange: #f39c12; |