Skip to content

Instantly share code, notes, and snippets.

View rglover's full-sized avatar

Ryan Glover rglover

View GitHub Profile
@rglover
rglover / languages.json
Created October 25, 2021 19:35
List of languages by ISO code and name in JSON
[
{
"code": "af",
"name": "Afrikaans"
},
{
"code": "af-ZA",
"name": "Afrikaans (South Africa)"
},
{
@rglover
rglover / countries.js
Created May 5, 2021 02:10
List of countries as JavaScript object array
export default [
{ code: "AF", name: "Afghanistan" },
{ code: "AX", name: "\u00c5land Islands" },
{ code: "AL", name: "Albania" },
{ code: "DZ", name: "Algeria" },
{ code: "AS", name: "American Samoa" },
{ code: "AD", name: "Andorra" },
{ code: "AO", name: "Angola" },
{ code: "AI", name: "Anguilla" },
{ code: "AQ", name: "Antarctica" },
@rglover
rglover / events.js
Created July 21, 2021 21:31
List of JavaScript DOM events
const events = [
"readystatechange",
"pointerlockchange",
"pointerlockerror",
"beforecopy",
"beforecut",
"beforepaste",
"freeze",
"resume",
"search",
@rglover
rglover / adverbs.js
Created June 16, 2021 19:23
Animals & Adverbs | How to Implement Real-Time Data with Websockets
export default [
"bold",
"brave",
"bright",
"cheerful",
"deft",
"devoted",
"eager",
"elegant",
"faithful",
@rglover
rglover / jsx-render.tsx
Created June 9, 2021 19:54 — forked from Dynalon/jsx-render.tsx
Sample JSX to HTMLElement renderer in TypeScript
// Tiny JSX renderer in TypeScript inspired by plain-jxs: https://github.com/callumlocke/plain-jsx
// Babel would allow you to specify the factory function as special inline comment:
/** @jsx JSXrender */
let JSXrender = (tagName: string, attributes?: { [key: string]: any }, ...children: Array<HTMLElement |  string>): HTMLElement => {
if (!tagName || typeof tagName !== 'string')
throw new Error("tagName has to be defined, non-empty string");
@rglover
rglover / gp-specials-board.css
Created August 8, 2012 01:11
Google Prettify - Specials Board CSS Theme
.prettyprint .str, code .str { color: #a9758c; } /* string */
.prettyprint .kwd, code .kwd { color: #d58840; } /* keyword */
.prettyprint .com, code .com { color: #767979; font-style: italic; } /* comment */
.prettyprint .typ, code .typ { color: #80aac6; } /* type */
.prettyprint .lit, code .lit { color: #ac758c; } /* literal */
.prettyprint .pun, code .pun { color: #fff; } /* punctuation */
.prettyprint .pln, code .pln { color: #fff; } /* plaintext */
.prettyprint .tag, code .tag { color: #fecf84; } /* html/xml tag */
.prettyprint .atn, code .atn { color: #ce8a45; } /* html/xml attribute name */
.prettyprint .atv, code .atv { color: #b2c869; } /* html/xml attribute value */
@rglover
rglover / keybase.md
Created August 13, 2014 18:49
Keybase Verification

Keybase proof

I hereby claim:

  • I am rglover on github.
  • I am glover (https://keybase.io/glover) on keybase.
  • I have a public key whose fingerprint is C4A8 6E78 B3EB 4D1E CC27 9965 E66E 2D94 84A8 88AD

To claim this, I am signing this object: