Skip to content

Instantly share code, notes, and snippets.

View roymckenzie's full-sized avatar

Roy McKenzie roymckenzie

View GitHub Profile
@vxnick
vxnick / gist:380904
Created April 27, 2010 15:52
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@aliang
aliang / Mac SSH Autocomplete
Created June 14, 2011 07:14
Add auto complete to your ssh, put into your .bash_profile
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@nickgrealy
nickgrealy / slack_emoticons_to_html_unicode.json
Created August 17, 2018 06:20
slack_emoticons_to_html_unicode.json
{
"+1": "&#x1F44D;",
"-1": "&#x1F44E;",
"100": "&#x1F4AF;",
"1234": "&#x1F522;",
"8ball": "&#x1F3B1;",
"ab": "&#x1F18E;",
"abc": "&#x1F524;",
"abcd": "&#x1F521;",
"accept": "&#x1F251;",
@th3hamburgler
th3hamburgler / app.css
Created July 26, 2021 15:51
Tailwind safe area inset utilities
@layer utilities {
/* extra helper classes to account for mobile safe areas */
.p-safe {
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.px-safe {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);