🧙♂️
This file contains 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
You will probably want something like this in a run block for your app: | |
window.NativeBridge.closestLocation = function (location) { | |
$rootScope.$broadcast('locationChange', location); | |
}; | |
And then a service to do all the stuff: | |
.service('ClosestLocation', function ($rootScope) { | |
var that = this; |
This file contains 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
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi' | |
# show git branch name in prompt | |
PS1='\[\e[1;32m\]\u: $CurDir $(__git_ps1 " (%s)")\$\[\e[0m\] ' | |
# make bash autocomplete with up arrow | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' | |
# make tab cycle through commands instead of listing |
This file contains 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 | |
/** | |
* A unique identifier is defined to store the options in the database and reference them from the theme. | |
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed. | |
* If the identifier changes, it'll appear as if the options have been reset. | |
* | |
*/ | |
function optionsframework_option_name() { |
This file contains 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 | |
// Grab the original options.php file | |
require_once( WOT_PLUGIN_DIR . '3rd-party/options.php' ); | |
add_filter( 'wot_options_page', 'wot_theme_add_options' ); | |
/** | |
* Add any custom fields that are required to the options framework |
This file contains 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
define([ | |
'marionette', | |
'templates' | |
], function(Marionette, Templates) { | |
var app = new Marionette.Application({ | |
root: '/', | |
templates: Templates | |
}); | |
This file contains 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
#install instructions at https://newrelic.com/docs/server/server-monitor-installation-ubuntu-and-debian | |
base: | |
pkgrepo.managed: | |
- humanname: Newrelic PPA | |
- name: deb http://apt.newrelic.com/debian/ newrelic non-free | |
# - dist: precise | |
- file: /etc/apt/sources.list.d/newrelic.list | |
- keyid: 548C16BF | |
- keyserver: subkeys.pgp.net |
This file contains 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 completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# 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 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
// Based off example code from Hal Robertson | |
// https://github.com/halrobertson/test-restify-passport-facebook | |
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao | |
var restify = require('restify') | |
// config vars | |
var FB_LOGIN_PATH = '/api/facebook_login' | |
var FB_CALLBACK_PATH = '/api/facebook_callback' | |
var FB_APPID = '<<YOUR APPID HERE>>' |
This file contains 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
{_} = require 'underscore' | |
child_process = require 'child_process' | |
async = require 'async' | |
healthCheckInterval = 60 * 1000 | |
bounceInterval = 60 * 1000 | |
bounceWait = bounceInterval + 30 * 1000 | |
delayTimeout = (ms, func) -> setTimeout func, ms | |
class MonitoredChild |
This file contains 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
// Inspiration: | |
// https://forums.adobe.com/message/2524327 | |
// http://www.indiscripts.com/post/2009/10/work-around-the-width-height-gap | |
var myDoc = app.activeDocument; | |
function getWidth(/*PageItem*/obj, /*bool*/visible) | |
// return the [width,height] of <obj> | |
// according to its (geometric|visible)Bounds | |
{ |
OlderNewer