This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| */ | |
| (function(doc, require, _) { | |
| //console.log( 'extend-with-title.js', require( 'util' ).inspect( arguments[0], { showHidden: false, depth: 2, colors: true } ) ); | |
| _.extend( doc, { | |
| 'new_title': 'modified title again!!' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "Layouts Directory", | |
| "items": [ | |
| { | |
| "id": "beautifully-baked", | |
| "slug": "beautifully-baked", | |
| "title": "Beautifully Baked", | |
| "description": "", | |
| "preview": "http://layouts.siteorigin.com/layout/beautifully-baked/", | |
| "screenshot": "http://s.wordpress.com/mshots/v1/http%3A%2F%2Flayouts.siteorigin.com%2Flayout%2Fbeautifully-baked%2F?w=400", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## Deploy branch into "develop" branch | |
| ## | |
| ## Usage: | |
| ## | |
| ## git deploy production | |
| ## | |
| ## Save Original Branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## | |
| ## curl -s -H "cache-control:no-cache" -H "pragma:no-cache" "https://gist.githubusercontent.com/andypotanin/83910a6477effe3f9e1186784c2a7206/raw/coreos.cloudinit.sh?v=1" | sudo bash; | |
| METADATA_URL="http://169.254.169.254/computeMetadata/" | |
| TMPFILE=$(mktemp /tmp/XXXXXX-cloud-init) | |
| if [[ $? -ne 0 || ! -f "${TMPFILE}" ]]; then | |
| echo "Failed to create temp file for user-data" >&2 | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!bash | |
| # | |
| # bash/zsh completion support for core Git. | |
| # | |
| # Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
| # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
| # Distributed under the GNU General Public License, version 2.0. | |
| # | |
| # The contained completion routines provide support for completing: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## export _REPO_FULL=UsabilityDynamics/www.exceedrealty.net | |
| ## curl -s --header "Authorization: token ${GITHUB_PERSONAL_TOKEN}" https://api.github.com/repos/${_REPO_FULL}/labels | |
| # Delete default labels | |
| curl -XDELETE -s --header "Authorization: token ${GITHUB_PERSONAL_TOKEN}" https://api.github.com/repos/${_REPO_FULL}/labels/bug | |
| # Create New Labels | |
| curl -XPOST -s --header "Authorization: token ${GITHUB_PERSONAL_TOKEN}" https://api.github.com/repos/${_REPO_FULL}/labels --data '{"name":"priority:low","color":"66aa00"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Explain What Middleware/Route does. | |
| * | |
| * @author potanin@UD | |
| * @param req | |
| * @param res | |
| * @param next | |
| * @returns {*} | |
| */ | |
| function myMiddleware( req, res, next ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "ok": true, | |
| "data": [ | |
| { | |
| "post_title": "Result A", | |
| "post_excerpt": "Result A excerpt" | |
| }, | |
| { | |
| "post_title": "Result B", | |
| "post_excerpt": "Result B excerpt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Only activate tests when on a 'develop' branch. | |
| if( isset( $_SERVER['HTTP_X_SELECTED_BRANCH'] ) && strpos( $_SERVER['HTTP_X_SELECTED_BRANCH'], 'develop' ) !== false ) { | |
| header( 'cache-control:no-cache, private' ); | |
| $_event_map = array( | |
| "init" => [ 5, 10, 20 ], | |
| "after_setup_theme" => [ 5, 10, 20 ], | |
| "plugins_loaded" => [ 5, 10, 20 ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| var root = jQuery(document.getElementsByTagName('body')); | |
| var watchers = []; | |
| var f = function (element) { | |
| if (element.data().hasOwnProperty('$scope')) { | |
| angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
| watchers.push(watcher); | |
| }); | |
| } |