Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
/** | |
* PHP-like print_r() equivalent for JavaScript Object | |
* | |
* @author Faisalman <[email protected]> | |
* @license http://www.opensource.org/licenses/mit-license.php | |
* @link http://gist.github.com/879208 | |
*/ | |
var print_r = function (obj, t) { | |
// define tab spacing |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
#! /usr/bin/env bash | |
# | |
# execute this script with: | |
# curl https://raw.github.com/gist/1499222/install-packages.sh | sudo bash -s <username> <public_key_url> | |
# curl https://raw.github.com/gist/1499222/install-packages.sh | sudo bash -s 'alan' 'https://dl.dropbox.com/s/qfo16yktbn23q9j/id_rsa.pub?dl=1' | |
# | |
user_name=$1 | |
public_key=$2 |
#!/usr/bin/env bash | |
# | |
# execute this script as root with: | |
# curl https://raw.github.com/gist/2123030/install_all.sh | bash -s MyAwesomeHostName | |
# | |
if [[ ! "root" = "$(whoami)" ]] ; then | |
echo -e "****\nThis script must be run as root.\n****" && exit 1 | |
fi |
anglar.module('myApp',['ui']).config(["$provide", function($provide) { | |
return $provide.decorator("$http", ["$delegate", function($delegate) { | |
var get = $delegate.get; | |
$delegate.get = function(url, config) { | |
// Check is to avoid breaking AngularUI ui-bootstrap-tpls.js: "template/accordion/accordion-group.html" | |
if (!~url.indexOf('template/')) { | |
// Append ?v=[cacheBustVersion] to url | |
url += (url.indexOf("?") === -1 ? "?" : "&"); | |
url += "v=" + cacheBustVersion; | |
} |
# Example integration of a background-image uploader | |
# Author: Guillaume Piot | |
# Email: [email protected] | |
# Company: Cotidia Ltd | |
# Licence: MIT | |
# | |
# The div holder is absolute positioned within the parent div | |
# | |
# <div class="[ article__image ] [ article-image ] [ editable ] [ parallax ]" data-name="article_image"> | |
# <div |
Version: 0.0.1 updated 7/1/2016
Cordova Plugins are the magic that enable our mobile web app content to access the full power of Native SDKs underneath, but through clean JavaScript APIs that work the same across all platforms we target.
Building Cordova plugins is scary for many Cordova and Ionic developers, but it doesn't have to be. This simple guide walks through the what, when, why, and how of Cordova plugin development for iOS and Android.
String.prototype.parseTransform = function() { | |
var prop = ['translate', 'matrix', 'rotate', 'skewX', 'skewY', 'scale']; | |
var val = this.match(/(translate|matrix|rotate|skewX|skewY|scale)\(.*?\)/g); | |
var obj = {}; | |
if (val) { | |
for (var i = 0, length = val.length; i < length; i++) { | |
var item = val[i]; | |
var index = item.indexOf('('); | |
var v = item.substring(index + 1, item.length - 1).split(/\,|\s/); | |
var n = item.substring(0, index); |
export default (element: HTMLElement, options: any = {}) => { | |
// if added as action on non focusable element you should add tabindex=0 attribute | |
const { | |
direction = undefined, | |
shiftMultiplier = 10, | |
bubbles = false, | |
stopKeydownPropagation = true, | |
} = options; |