Skip to content

Instantly share code, notes, and snippets.

Avatar
💀
calc(dev*design)

Adam Argyle argyleink

💀
calc(dev*design)
View GitHub Profile
View touchEventWireup
function inferInputModel() {
if (window.navigator.msPointerEnabled) {
return 'pointer';
} else if (window.ontouchstart !== undefined) {
return 'touch';
} else {
return 'unknown';
}
}
View Getting started with requirejs.md

This is a small collection of scripts showing how to use require.js. It's only one of several ways of setting up a require.js project, but it's enough to get started.

At its core, require.js is about three things:

  1. Dependency management
  2. Modularity
  3. Dynamic script loading

The following files show how these are achieved.

View server.md

Booting Up A Development Server

Open a console. Terminal.app on Macs, your shell or whatever on PCs.

Python is easiest:

python -m SimpleHTTPServer 8000

Then go to http://localhost:8000/ in a web browser.

@argyleink
argyleink / blingbling.js
Last active May 19, 2018 — forked from paulirish/bling.js
add some sugar to bling dot js
View blingbling.js
const sugar = {
on: function(names, fn) {
names
.split(' ')
.forEach(name =>
this.addEventListener(name, fn))
},
setAttributes: function(attrs) {
Object.entries(attrs)
.forEach(([key, val]) =>
@argyleink
argyleink / tweak-sublime-theme-italics.md
Last active Oct 19, 2020 — forked from lavaldi/tweaks-sublime-italic-operator-mono.md
Operator Mono (or others) & any Sublime Text 3 theme cursive settings
View tweak-sublime-theme-italics.md
  1. Install Package Resource Viewer.
  2. In package control window select ‘Package Resource Viewer: Open Resource’.
  3. Scroll down until you find the option: ‘Color Scheme — Default’ (or your theme with color scheme .tmTheme) and select it.
  4. Add the following to the end of the node to style selected (scope) syntax tokens cursive:
<dict>
	<key>name</key>
	<string>Mono Tweaks</string>
	<key>scope</key>
You can’t perform that action at this time.