(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Enable IE8 support for indexOf | |
if ( typeof Array.prototype.indexOf === 'undefined' ) { | |
Array.prototype.indexOf = function(item) { | |
for (var i = 0; i < this.length; i++) { | |
if (this[i] === item) { | |
return i; | |
} | |
return -1; | |
} | |
} |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
// YourProject-Bridging-Header.h | |
#import <FacebookSDK/FacebookSDK.h> | |
// AppDelegate.swift | |
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
. |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
These instructions will guide you through the process of setting up local, trusted websites on your own computer.
These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.
NOTE: You may substitute the edit
command for nano
, vim
, or whatever the editor of your choice is. Personally, I forward the edit
command to Sublime Text:
alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
// Check and verify user status or prompt for authorization | |
function checkUserStatus(response) { | |
var permissions = { | |
scope: '' // email | |
}; | |
if ( isConnectedUser(response) ) | |
return FB.api('/me', gotUserInfo); | |
return FB.login(checkUserStatus, permissions); | |
} |
// setup | |
!(function(root) { | |
var AsyncGoogleMap = (function() { | |
// constructor | |
function AsyncGoogleMap(canvas, lat, lng, zoom, callback) { | |
if ( typeof canvas === 'undefined' ) |
/** | |
* This is small, light weight vanilla JavaScript Bootstrap script. | |
* | |
* It comes handy in situations where a framework i.e. jQuery is used only | |
* for "load" and "ready" events etc. This small script will not only save | |
* lot of bytes but also gives a basic start on writing object literal JavaScript. | |
* | |
* Learn more about object literal JavaScript at following resource: | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals | |
* |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {