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
// The contents of this file will be executed before any of | |
// your view controllers are ever executed, including the index. | |
// You have access to all functionality on the `Alloy` namespace. | |
// | |
// This is a great place to do any initialization for your app | |
// or create any global variables/functions that you'd like to | |
// make available throughout your app. You can easily make things | |
// accessible globally by attaching them to the `Alloy.Globals` | |
// object. For example: | |
// |
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
/* | |
Place this file in your /lib directory. | |
Require geo in calling module like var geo = require("geo"); Then call geo.init() at the start of your app. | |
To get current location, place a fireEvent at the start of your app and anywhere else location needs updating like this: | |
Ti.App.addEventListener('resume', function() { | |
Ti.App.fireEvent('getCurrentPosition'); | |
}); | |
@author Michael Stelly, et al. |
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
/** | |
* | |
* When trying mongo_field_storage, and want to go back to old settings use this: | |
* | |
**/ | |
function custom_field_config() { | |
$res = db_query("SELECT * FROM {field_config}"); | |
$data = $res->fetchAll(); | |
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
sed -i '1i Text for first line' /filename.csv |
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
public class Collatz { | |
public static void main(String [] argv) { | |
int x = 100; | |
int z = 0; | |
while (x != 1) { | |
if (x % 2 == 0) { | |
x = x / 2; | |
} |
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 x = 100, z = 0; | |
while (x != 1) { | |
if (x % 2 == 0) { | |
x = x / 2; | |
} | |
else { | |
x = x * 3 + 1; | |
} | |
z++; | |
} |
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 -iname "*.jpg" -type f -print0 | parallel --progress -0 -j +0 "mogrify -resize 800x800\> {}" |