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
AUI().use( | |
'liferay-service', 'json', 'async-queue', | |
function(A) { | |
var states = [['AL', 'Alabama', 'The Heart of Dixie'], ['AK', 'Alaska', 'The Land of the Midnight Sun'], ['AZ', 'Arizona', 'The Grand Canyon State'], ['AR', 'Arkansas', 'The Natural State'], ['CA', 'California', 'The Golden State'], ['CO', 'Colorado', 'The Mountain State'], ['CT', 'Connecticut', 'The Constitution State'], ['DE', 'Delaware', 'The First State'], ['DC', 'District of Columbia', "The Nation's Capital"], ['FL', 'Florida', 'The Sunshine State'], ['GA', 'Georgia', 'The Peach State'], ['HI', 'Hawaii', 'The Aloha State'], ['ID', 'Idaho', 'Famous Potatoes'], ['IL', 'Illinois', 'The Prairie State'], ['IN', 'Indiana', 'The Hospitality State'], ['IA', 'Iowa', 'The Corn State'], ['KS', 'Kansas', 'The Sunflower State'], ['KY', 'Kentucky', 'The Bluegrass State'], ['LA', 'Louisiana', 'The Bayou State'], ['ME', 'Maine', 'The Pine Tree State'], ['MD', 'Maryland', 'Chesapeake State'], ['MA', 'Massachusetts', 'The Spirit of America'], ['MI', 'M |
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
open = "!f() { editor=`git config --get user.editor`;files=`git show --pretty="format:" --name-only $1`;useopen=`command -v open`; usecygwin=`command -v cygstart`; [[ -n "$useopen" ]] && open -a $editor $files && exit $?; [[ -n "$usecygwin" ]] && editor=$(cygpath -d "$editor"); for i in $files; do echo "opening $i"; $usecygwin $editor $i; done }; f" |
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
{ | |
replaceStr: function(match, fragment, string) { | |
return fragment + 'm=' + (match.split('<%= javaScriptRootPath %>')[1] || ''); | |
}, | |
searchExp: '(\\?|&)/([^&]+)' | |
}; |
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
var BUFFER_PREF_SUFF = []; | |
A.mix( | |
LString, | |
{ | |
prefixFn: A.cached( | |
function(prefix) { | |
var instance = this; | |
return A.rbind('suffix', LString, prefix); |
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
Liferay.Form.bind = function(ns, fm) { | |
var form = document[ns + (fm || 'fm')], formNode = A.one(form); | |
return function(id) { | |
return id ? A.one(form[ns + id]) : formNode; | |
}; | |
}; | |
fm = Liferay.Form.bind('_174_'); | |
fm('toggle_id_users_admin_user_searchkeywords') |
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
RESOLVE = function() { | |
var seen = {}; | |
var resolved = {}; | |
var aui_mods = YUI.AUI_config.groups.alloy.modules; | |
var yui_mods = YUI.Env[YUI().version].modules; | |
var A = AUI(); | |
var all_mods = A.merge(aui_mods, yui_mods); | |
var mods = all_mods; | |
// var mods = aui_mods; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> | |
<plist version="0.9"> | |
<dict> | |
<key>CFBundleIconFile</key> | |
<string>icon.icns</string> | |
<key>CFBundlePackageType</key> | |
<string>APPL</string> |
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
# Paste this line into your .gitconfig | |
split = "!f() { git checkout -b $2 && msg=$(git stash save) && git checkout - && git reset --hard $1 && git checkout $2 && [[ ! $msg =~ ^'No local changes to save'$ ]] && git stash pop; }; f" | |
# move all commits after the SHA to a new branch | |
# use case: I accidentally make a bunch of commits into my master branch for a specific feature. | |
# I want to split off a feature branch and reset my current branch to some point in time before my changes. | |
# usage | |
# git split SHA NEW_BRANCH_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
Liferay = window.Liferay || {}; | |
;(function(A, Liferay) { | |
var Lang = A.Lang; | |
Liferay.namespace = A.namespace; | |
A.mix( | |
AUI.defaults.io, | |
{ |
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
//replace LINK_ID | |
//Add this to your theme vm | |
<div id="LINK_ID"> | |
<a href="javascript:;" data-customCssClass="red">Red</a> | |
<a href="javascript:;" data-customCssClass="blue">Blue</a> | |
<a href="javascript:;" data-customCssClass="green">Green</a> | |
</div> | |
//Add this to your JS somewhere |
OlderNewer