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
# Pass in the path to the file that contains the path patterns for the app | |
# groups you want to check out —e.g. | |
# | |
# make checkout patterns=path/to/fooModule | |
# | |
# Where fooModule is a flat file with glob patterns like the ones defined | |
# at: https://www.git-scm.com/docs/git-sparse-checkout#_full_pattern_set | |
# | |
# You should ideally keep one of these pattern files per app group, and model | |
# your app groups after stand-alone modules, with matching names for forms |
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
echo jssrc > cloc_exclude_list | |
echo models >> cloc_exclude_list | |
echo studioactions >> cloc_exclude_list | |
echo modules/kony_sdk.js >> cloc_exclude_list | |
echo modules/require/moment.min.js >> cloc_exclude_list | |
cloc . \ | |
--exclude-list-file=cloc_exclude_list \ | |
--ignore-whitespace \ | |
--include-ext=js \ |
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
"use strict" | |
/*exported defineGetters*/ | |
/** | |
* Applies a function as the getter function for all the custom properties | |
* of a component named in an array. | |
* This is useful to avoid repeating yourself when the getter for two or more | |
* custom properties is the same —e.g. | |
* <pre><code> |
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
// We do this to avoid cluttering the project with 3rd party JS. | |
// It also avoids loading all the 3rd party JS at app launch. | |
require.config({ | |
paths: { | |
"lodash": "https://cdn.jsdelivr.net/npm/[email protected]/lodash.min", | |
"moment": "https://momentjs.com/downloads/moment-with-locales.min" | |
}, | |
waitSeconds: 10 | |
}); |
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
# Find ALL the port users. _o/ | |
findbyport() { | |
lsof -nP | grep ":$@" | awk '{print "Program: " $1 "\n" "PID: "$2 "\n" "User: " $3 "\n" "Address: "$9 "\n" "Action: " $10}' | |
} | |
portsinuse() { | |
lsof -nP | grep "IPv" | while read line; do echo $line | awk '{print "Program: " $1 "\n" "PID: "$2 "\n" "User: " $3 "\n" "Address: "$9 "\n" "Action: " $10}'; echo; done; | |
} |
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
keyboard_sleep(){ | |
# xinput -list | |
xinput --disable "AT Translated Set 2 keyboard" | |
sleep 3600 ; xinput --enable "AT Translated Set 2 keyboard" | |
} | |
keyboard_awake(){ | |
# xinput -list | |
xinput --enable "AT Translated Set 2 keyboard" | |
} |
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
findbyport() { | |
# lsof -i | grep ":$@" | awk '{print "Program: " $1 "\t" "PID: "$2 "\t" "User: " $3 "\t" "Address: "$9 "\t" "Action: " $10 }' | |
lsof -i ":$@" | grep ":$@" | awk '{print $2}' | |
} | |
killbyport() { | |
kill $(findbyport $@) | |
} | |
portsinuse() { |
OlderNewer