Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jdiamond's full-sized avatar

Jason Diamond jdiamond

  • 03:46 (UTC -07:00)
View GitHub Profile
@ejlp12
ejlp12 / 1_ecs_note.md
Last active September 21, 2023 20:25
ECS Best Practices Notes
Continent_Name Continent_Code Country_Name Two_Letter_Country_Code Three_Letter_Country_Code Country_Number
Asia AS Afghanistan, Islamic Republic of AF AFG 4
Europe EU Albania, Republic of AL ALB 8
Antarctica AN Antarctica (the territory South of 60 deg S) AQ ATA 10
Africa AF Algeria, People's Democratic Republic of DZ DZA 12
Oceania OC American Samoa AS ASM 16
Europe EU Andorra, Principality of AD AND 20
Africa AF Angola, Republic of AO AGO 24
North America NA Antigua and Barbuda AG ATG 28
Europe EU Azerbaijan, Republic of AZ AZE 31
@sindresorhus
sindresorhus / post-merge
Last active February 14, 2024 06:20
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->