Popular ways of naming media queries:
- Device (mobile, tablet, desktop)
- Size (xs ,s, m, l, xl)
- Anonymous (alpha, beta, gamma)
I've been experimenting with naming the layouts of a module itself.
- 2 columns
- 3 columns
(function(cordova){ | |
'use strict'; | |
var exports = {},method; | |
// Plugin Definition | |
var plugin = { | |
name:'<PluginName>', | |
api:{ |
// Mixins define the various layouts and options of a module, other modules are not allowed to override styles on subnodes of a module. | |
// HTML | |
// | |
// <ol class="article-list"> | |
// <li> | |
// <article class="article-item"> | |
// <h1>Sass outline experiment</h1> | |
// <dl> |
I hereby claim:
To claim this, I am signing this object:
# "Usernoted" seems to be the "user notifications daemon", so get it's PID. | |
pid=$(ps aux | grep -i [u]sernoted | awk '{print $2}') | |
# Find the sqlite3 database that this program has open. It's in a "private" folder (app sandboxing). | |
db="$(lsof -p $pid | grep com.apple.notificationcenter/db/db\$ | awk '{print $9}')" | |
# I got the bundleid from Spotify.app/Contents/Info.plist | |
bundleid="com.spotify.client" | |
# I use 0 as the flags because you can change all the settings in System Preferences |
import UIKit | |
extension UIView { | |
func hide() { | |
hidden = true | |
} | |
func show() { | |
hidden = false |
// (c) copyright unscriptable.com / John Hann | |
// License MIT | |
// For more robust promises, see https://github.com/briancavalier/when.js. | |
function Promise () { | |
this._thens = []; | |
} | |
Promise.prototype = { |
var animate = (function(){ | |
'use strict'; | |
var PI = Math.PI; | |
var PI_HALF = Math.PI/2; | |
var deltas = { | |
linear:function(p) {return p;}, | |
easeInSine:function(p) {return Math.cos(p * PI_HALF);}, |
Assumption: Next button is most clicked button in a pagination control.
The trap is to layout the HTML to match the design of the control. With the next button last and the previous button first.
By reformatting the HTML we can make things easier for everyone:
Any suggestions on what more we could improve?
const arrow = (str, i) => str[i] === '-' && str[i+1] === '>'; | |
const string = (c) => c === "'" || c === '"'; | |
const comma = (c) => c === ','; | |
const opener = (c) => c === '('; | |
const closer = (c) => c === ')'; |