#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| /** | |
| * Convert XML Properties into key-value pair array where key=attribute name | |
| * and value=value of attribute | |
| * @param SimpleXML $xml | |
| * @param Array $array property map | |
| * e.g. $propertyMap = array( | |
| "metadata" => array( | |
| "item" => array( | |
| "description" => array(true, 'page_description', 'stringParam'), | |
| "keywords" => array(true, 'page_keywords'), |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| <?php | |
| function getFiles($path, $extensions=null, &$files=null) | |
| { | |
| if(!is_dir($path)) return null; | |
| $files = ($files==null)?array():$files; | |
| $extensions = is_array($extensions) ? implode('|', $extensions) : $extensions; | |
| if ($handle = opendir($path)) { | |
| while (false !== ($entry = readdir($handle))) { | |
| if(preg_match("/^.*\.(". $extensions .")$/i", $entry)) { |
| <!DOCTYPE html> | |
| <!-- Helpful things to keep in your <head/> | |
| // Brian Blakely, 360i | |
| // http://twitter.com/brianblakely/ | |
| --> | |
| <head> | |
| <!-- Disable automatic DNS prefetching. | |
| /** | |
| * Annoying.js - How to be an asshole to your users | |
| * | |
| * DO NOT EVER, EVER USE THIS. | |
| * | |
| * Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com) | |
| * Visit https://gist.github.com/767982 for more information and changelogs. | |
| * Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog | |
| * Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors | |
| * |
| <snippet> | |
| <content><![CDATA[ | |
| <script src="${1:bootstrap/}js/bootstrap.${2:min.}js"></script> | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>tbjs</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>text.html</scope> | |
| <description>Bootstrap Add Script</description> | |
| </snippet> |
| <snippet> | |
| <content><![CDATA[ | |
| <link href="${1:bootstrap/}css/bootstrap.${2:min.}css" rel="stylesheet"> | |
| <link href="${1:bootstrap/}css/bootstrap-responsive.${2:min.}css" rel="stylesheet"> | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>tbcss</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>text.html</scope> | |
| <description>Bootstrap Add Stylesheet</description> |
| { | |
| "files": | |
| { | |
| "jquery" : "http://code.jquery.com/jquery.js", | |
| "jquery.min" : "http://code.jquery.com/jquery.min.js", | |
| "jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js", | |
| "jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js", | |
| "jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js", | |
| "jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js", | |
| "jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js", |
| function objectToArray($d) { | |
| if (is_object($d)) { | |
| // Gets the properties of the given object | |
| // with get_object_vars function | |
| $d = get_object_vars($d); | |
| } | |
| if (is_array($d)) { | |
| /* | |
| * Return array converted to object |