The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
rm -r .git | |
git init | |
(create files) | |
git add -A | |
git commit -m 'Initial commit' | |
git remote add origin <url> | |
git push --force --set-upstream origin master |
function objectToQuerystring (obj) { | |
return Object.keys.reduce(function (str, key, i) { | |
var delimiter, val; | |
delimiter = (i === 0) ? '?' : '&'; | |
key = encodeURIComponent(key); | |
val = encodeURIComponent(obj[key]); | |
return [str, delimiter, key, '=', val].join(''); | |
}, ''); | |
} |
[{ | |
"name": "Afghanistan (افغانستان)", | |
"iso2": "af", | |
"dialCode": "93" | |
}, { | |
"name": "Albania (Shqipëri)", | |
"iso2": "al", | |
"dialCode": "355" | |
}, { | |
"name": "Algeria (الجزائر)", |
angular.module('A').directive('formAutofillFix', function ($timeout) { | |
return function (scope, element, attrs) { | |
element.prop('method', 'post'); | |
if (attrs.ngSubmit) { | |
$timeout(function () { | |
element | |
.unbind('submit') | |
.bind('submit', function (event) { | |
event.preventDefault(); | |
element |
"use strict"; | |
var _ = require('lodash'); | |
/** | |
* Custom matchers for protractor and jasmine 2 | |
* | |
* expect(el).toBePresent(); | |
* expect(el).toBeDisplayed(); | |
* expect(el).toContainText('text to contain'); |
'use strict'; | |
// generated on 2014-06-24 using generator-gulp-webapp 0.1.0 | |
var src_dir = 'app', | |
dest_dir = 'dist'; | |
var gulp = require('gulp'); | |
// load plugins |
• SSH to your server to start creating a subdomain (https://library.linode.com/hosting-website#sph_configuring-name-based-virtual-hosts) | |
• Go to ~/public/ | |
› mkdir -p sub.example.com/{public,log,backup} | |
› cd sub.example.com/public/ | |
› nano index.html | nano index.php | |
• Write 'Hello world' or whatever, we just need a html|php file to test with |
$base-font-size: 16px; | |
$base-line-height: 1.5; | |
// this value may vary for each font | |
// unitless value relative to 1em | |
$cap-height: 0.68; | |
@mixin baseline($font-size, $scale: 2) { |