Moved to: https://github.com/FokkeZB/UTiL/tree/master/validate
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
| task("pre:compile", function(event,logger) { | |
| var wrench = require("wrench"), | |
| fs = require("fs"), | |
| controllers_root = event.dir.controllers, | |
| path = require("path"); | |
| if (event.alloyConfig.deployType === 'production') { | |
| return; | |
| } |
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
| /* | |
| * Common JS module to help with Ti Event listener handling. | |
| * @author Neville Dastur | |
| * @url http://www.clinsoftsolutions.com | |
| * | |
| * Acknowledgements go to https://gist.github.com/minhnc/2333095 as my starting point on this | |
| */ | |
| exports.registerEventListener = function(obj, event, callabck) { | |
| if ( typeof obj._eventListeners == 'undefined' ) { |
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 isProduction(alloyConfig) | |
| { | |
| return 'production' == alloyConfig.deploytype; | |
| } | |
| function removeUnimportantLogCallsFromContent(content) | |
| { | |
| if (!content) { | |
| return; | |
| } |
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
| 'Label[platform=android]': { | |
| color: '#000' // all platforms except Android default to black | |
| } | |
| 'Window': { | |
| backgroundColor: '#fff' // white background instead of default transparent | |
| } | |
| 'Window[platform=android]': { | |
| modal: false // make android windows all heavyweight |
UPDATE: With the assets command of the TiCons CLI / Module this can be done even simpeler by calling $ ticons assets or an alloy.ymk using:
task("pre:load", function(event, logger) {
require('ticons').assets();
});
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
| // | |
| // https://github.com/caolan/async | |
| // | |
| var async = require('async'); | |
| // this function will be called for each array element | |
| function process(_url, _processCallback) { | |
| // download the file | |
| get_file(_url, function(_resp) { |
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
| # === Terminal.app === # | |
| # Open new tab in terminal. | |
| exec("osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' > /dev/null 2>&1 ") | |
| # Open directory | |
| exec("osascript -e 'tell application \"Terminal\" to do script \"cd directory\" in selected tab of the front window' > /dev/null 2>&1 ") | |
| # Open directory in new tab (this is better) | |
| exec("osascript -e 'tell application \"Terminal\"' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'do script with command \"cd directory && clear\" in selected tab of the front window' -e 'end tell' > /dev/null 2>&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
| #!/bin/sh | |
| # This script is a very naive XML parser for sh | |
| # ... | |
| # This fontion is called once for each file. It initialize the parser | |
| # | |
| # Type: private | |
| # Parameters: |
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
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |