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 | |
// 1, 4, 6, 3, 2 | |
function findPivot($arr, $checkIndex = NULL){ | |
//if only one value is passed into array, that is the pivot point because nothing on the left == nothing on the right | |
if(count($arr) == 1) return 0; | |
$lastCheckIndex = count($arr) - 1; | |
if( | |
$checkIndex > $lastCheckIndex || |
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
{ | |
"start": 1233456, | |
"end": 1234567 | |
} |
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
alias gkill="sudo kill -9 `ps -a | grep 'bin/grunt' | awk '{print $1}'`" |
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
$cd /path/to/projectA | |
$git subtree split --prefix=subDirA/subDirB/ --branch=split-branch | |
. | |
. | |
Created branch 'split-branch' | |
334e51707eb9115be61f8a5bd731e7093d26742c | |
$cd /path/to/projectB | |
$git merge /path/to/projectA split-branch master | |
fatal: Can merge only exactly one commit into empty head | |
$git merge /path/to/projectA 334e51707eb9115be61f8a5bd731e7093d26742c master |
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
{ | |
"id":1, | |
"name":"name 1", | |
"segments":[ | |
{"type":"KEYWORDS", "values":["market", "automation"]}, | |
{"type":"ZIPCODE", "values":["94086", "94087", "94067"]} | |
], | |
"newchange":123 | |
} |
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
.directive('postMessage', ['$window', 'postMessageService', function($window, postMessageService) { | |
return { | |
restrict: 'A', | |
controller: function($scope, $attrs, postMessageService) { | |
$scope.$on('outgoingMessage', function(evt, payload, targetOrigin, responseCallback) { | |
// console.log('Caught Message:'); | |
// console.log(payload); | |
if ($scope.sender) { | |
var message = { | |
status: 200, |
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
angular.module('angularDomEdit', []).directive('domEdit', function(){ | |
return { | |
restrict: 'A', | |
scope: { | |
mouseOver: '&domEditMouseOver', | |
itemSelect: '&domEditItemSelect', | |
close: '&domEditClose', | |
elementClick: '&domEditElementClick', | |
overlayClick: '&domEditOverlayClick', | |
resize: '&domEditResize', |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
alias cp='cp -iv' # Preferred 'cp' implementation | |
alias mv='mv -iv' # Preferred 'mv' implementation | |
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation | |
alias ll='ls -FGlAhp' # Preferred 'ls' implementation | |
alias less='less -FSRXc' # Preferred 'less' implementation | |
cd() { builtin cd "$@"; ll; } # Always list directory contents upon 'cd' | |
alias cd..='cd ../' # Go back 1 directory level (for fast typers) | |
alias ..='cd ../' # Go back 1 directory level | |
alias ...='cd ../../' # Go back 2 directory levels | |
alias .3='cd ../../../' # Go back 3 directory levels |
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
@font-face { | |
font-family: 'Open Sans'; | |
font-style: normal; | |
font-weight: 300; | |
src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/opensans/opensans-light.woff') format('woff'); | |
} | |
@font-face { | |
font-family: 'Open Sans'; | |
font-style: normal; | |
font-weight: 400; |
OlderNewer