Skip to content

Instantly share code, notes, and snippets.

View MatthewCallis's full-sized avatar
🍖
Hungry Goriya

Matthew Callis MatthewCallis

🍖
Hungry Goriya
View GitHub Profile
@MatthewCallis
MatthewCallis / SNES TODO.md
Created January 8, 2017 03:31
eludevisibility.org To-Do List

SNES Carts Need Labels Printed & Holes Cut:

@MatthewCallis
MatthewCallis / notification.coffee
Created November 15, 2016 18:08
Simple Browser Notifications
notify: (title, options) ->
options.icon = options.icon or "#{window.location.protocol}//#{window.location.hostname}#{$('meta#icon-120x120').attr('href')}"
# Check for notification compatibility, if browser version is unsupported, be silent.
return unless window.Notification
# If the user has not been asked to grant or deny notifications from this domain
if Notification.permission is 'default'
Notification.requestPermission ->
@notify(title, options)
# If the user has granted permission for this domain to send notifications.
else if Notification.permission is 'granted'
@MatthewCallis
MatthewCallis / config.cson
Last active March 14, 2018 23:44
Atom Config
"*":
"activate-power-mode":
autoToggle: false
"atom-beautify":
general:
_analyticsUserId: "1096fe32-134e-4c2c-a217-2e8a6324be94"
"atom-color-highlight":
hideMarkersInComments: true
hideMarkersInStrings: true
"atom-ide-ui":
@MatthewCallis
MatthewCallis / styles.less
Last active April 3, 2018 20:29
Atom Styles
// https://github.com/tonsky/FiraCode/wiki/Atom-instructions
atom-text-editor {
text-rendering: optimizeLegibility; // Ligatures
-webkit-font-feature-settings: "liga" off, "calt" off;
}
// Cursor
atom-text-editor .cursor {
position: absolute;
border-left: 2px solid;
@MatthewCallis
MatthewCallis / zones.coffee
Created December 15, 2015 20:17
ISO Language Codes, ISO Country Codes, Time Zones
values =
locale_country_code: [
{ title: "Andorra", value: "AD" },
{ title: "United Arab Emirates", value: "AE" },
{ title: "Afghanistan", value: "AF" },
{ title: "Antigua and Barbuda", value: "AG" },
{ title: "Anguilla", value: "AI" },
{ title: "Albania", value: "AL" },
{ title: "Armenia", value: "AM" },
{ title: "Angola", value: "AO" },
@MatthewCallis
MatthewCallis / defer.coffee
Created September 18, 2015 17:58
Defer Loading of Scripts
downloadJSAtOnload = ->
scripts = [
{ src: '//www.googleadservices.com/pagead/conversion.js' } # Google Adwords
{ src: '//platform.twitter.com/oct.js' } # Twitter Conversion Tracking
{ src: "//js.hubspot.com/analytics/#{(Math.ceil(new Date()/300000)*300000)}/123456.js", id: 'hs-analytics' } # Hubspot
{ src: '//tag.perfectaudience.com/serve/SHASHASHASHASHASHA.js' } # Perfect Audience
{ src: '//cdn.bizible.com/_biz-a.js', id: 'bizible-settings' } # Bizible
{ src: "#{if ("https:" is document.location.protocol) then "https://s" else "http://a"}.adroll.com/j/roundtrip.js" } # Adroll
]
for script in scripts
@MatthewCallis
MatthewCallis / nginx-server.py
Created July 12, 2015 02:21
Quick Local Nginx Server
#!/usr/bin/env python
"""\
Usage: %prog [path:.] [port:12345]
"""
import os
import sys
import subprocess
conf_template = """\
@MatthewCallis
MatthewCallis / coffeelint.json
Created June 12, 2015 00:19
JavaScript Style Guide
{
"coffeescript_error": {
"level": "error"
},
"arrow_spacing": {
"name": "arrow_spacing",
"level": "warn"
},
"no_tabs": {
"name": "no_tabs",
@MatthewCallis
MatthewCallis / locale_codes.coffee
Last active December 6, 2023 09:25
Country / Language / Locale Code List / Hash / Array
getLanguage: (language_code) ->
key = language_code.toLowerCase().replace(/-/, '_')
isoLangs = [
{ code:"aa", name:"Afar" },
{ code:"ab", name:"Abkhaz" },
{ code:"ae", name:"Avestan" },
{ code:"af", name:"Afrikaans" },
{ code:"ak", name:"Akan" },
{ code:"am", name:"Amharic" },
{ code:"an", name:"Aragonese" },
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background: #000;
}
</style>
<body>