Where possible, limit CSS files width to 80 characters. Reasons for this include
- the ability to have multiple files open side by side;
function isFloat(n){ | |
return n === +n && n !== (n|0); | |
} | |
function isInteger(n){ | |
return n === +n && n === (n|0); | |
} |
import os | |
import posixpath | |
import urllib | |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
# modify this to add additional routes | |
ROUTES = ( | |
# [url_prefix , directory_path] | |
['/media', '/var/www/media'], |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min.js"></script> | |
<style id="jsbin-css"> | |
body, |
import React, { Component } from 'react'; | |
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
import { provide, connect } from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
// ------------ | |
// reducers | |
// ------------ |
{ | |
"name" : "ServeStaticContent", | |
"version" : "0.0.1", | |
"dependencies" : { | |
"express" : "3.x" | |
} | |
} |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
{ | |
"auto_complete": true, | |
"auto_complete_delay": 0, | |
"bold_folder_labels": false, | |
"caret_style": "wide", | |
"color_scheme": "Packages/Color Scheme - Default/iPlastic.tmTheme", | |
"detect_slow_plugins": false, | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"draw_indentbundle install_guides": true, | |
"draw_white_space": "all", |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
BASE = . | |
build: | |
cd build && node build.js | |
.PHONY: build |