Skip to content

Instantly share code, notes, and snippets.

<!-- 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 &amp; Barbuda (+1268)</option>
@Nilpo
Nilpo / material_design_guidelines_dimens.xml
Created October 17, 2016 02:42 — forked from aeroechelon/material_design_guidelines_dimens.xml
Recommended Material Design Dimensions for Android
<?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
@Nilpo
Nilpo / Android Studio Tricks.md
Created September 30, 2016 05:38 — forked from arriolac/Android Studio Tricks.md
Some Android Studio Tricks.

Android Studio Notes

Android Studio keyboard shortcuts I use often.

Keyboard Shortcuts for Mac

  • SHIFT + F6 to refactor methods, classes, and variable names
  • CTRL + O to override methods
  • COMMAND + N
    • Generate getter, setter, and constructor method for a class (when in editor pane)
@Nilpo
Nilpo / BIND for the Small LAN.md
Last active February 26, 2025 02:42
How to configure BIND 9 to act as a caching nameserver or as the nameserver for a local domain.
@Nilpo
Nilpo / 0_reuse_code.js
Created September 17, 2016 05:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Nilpo
Nilpo / allow
Created September 16, 2016 01:40 — forked from Mteigers/allow
CSF Allow AND Ignore Cloudflare IPv4 IP's.
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done
@Nilpo
Nilpo / MapAdjust.java
Created April 19, 2016 02:54 — forked from codebutler/MapAdjust.java
Code to offset Android Google Map positions in pixels.
// 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
@Nilpo
Nilpo / JsonHelper.java
Created April 19, 2016 02:46 — forked from codebutler/JsonHelper.java
Convert Android JSONObject/JSONArray to a standard Map/List.
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();
@Nilpo
Nilpo / gist:defc4feacbb71f79cf13
Created January 29, 2016 06:48 — forked from max/gist:5708466
Flat UI Colors as Sass variables
// 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;
@Nilpo
Nilpo / flat-ui-color-palette.scss
Created January 29, 2016 06:36
SCSS Flat UI Color Palette from flatuicolors.com
// 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;