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
echo "(•_•)" | |
echo "<) )╯ $USER starts" | |
echo " / \ " | |
echo "" | |
echo "\(•_•) " | |
echo " ( (> the derived data" | |
echo " / \ " | |
echo "" | |
echo " (•_•) " | |
echo "<) )> dance" |
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
- (void)tableViewEnabled:(BOOL)enabled withBlock:(void (^)(void))block | |
{ | |
if (enabled) { | |
[self transitionView:^{ | |
self.tableView.alpha = 1; | |
_minMaxNightsHeightConstraint.constant = 0; | |
[_minMaxStayLabel resetStyle]; | |
_minMaxStayLabel.text = @""; |
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
class AddBruteForceSecurityToUsers < ActiveRecord::Migration | |
def change | |
add_column :users, :failed_login_count, :integer, :default => 0 | |
end | |
end |
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
// We need to add the following proxies to our project before Napp UI works. | |
// This is due to some limitations of the Titanium Module SDK | |
// Please run this after you require the | |
exports.initNappUI = function() { | |
require('dk.napp.ui'); // require the module | |
// window and tabs | |
var win1 = Ti.UI.createWindow(); |
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
// If you remove code for any of the APIs except TiUIView (Available for module uses), | |
// then compile for iOS device will fail. | |
// Like, if i remove | |
// var PickerV = Ti.UI.createPicker(); | |
// from the below code, then build for iOS device will fail, as you have used that in your module, and xcode will report as undefined symbol for TiUIPicker. | |
var NappUI = require('dk.napp.ui'); | |
var win1 = Ti.UI.createWindow({ |
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
/** | |
* @method slideIn | |
* Makes the specified view appear using a "slide-in" animation, it will automatically | |
* detect where the view is offscreen and bring it into the user's vison. | |
* @param {Titanium.UI.View} view View to animate. | |
* @param {Number} duration Fade duration in milliseconds. | |
* @param {function()} [finishCallback] Callback function, invoked after the popIn completes. | |
*/ | |
exports.slideIn = function (view, duration, finishCallback) { | |
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
var isTablet = osname === 'ipad' || (osname === 'android' && Titanium.Platform.Android.physicalSizeCategory > 2); |
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 HorizontalTableView(options) { | |
// defaults params | |
var options = options || {}; | |
options.width = options.width || Titanium.Platform.displayCaps.platformWidth; | |
options.height = options.height || Titanium.Platform.displayCaps.platformHeight; | |
var isAndroid = Ti.Platform.osname === 'android'; | |
// On iOS we can do this, on Android there is some weird scrolling problems |
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
webView.addEventListener("load", function(e){ | |
if (e.url != null && e.url.indexOf("market://") != -1) { | |
// Open the URL from the device | |
Titanium.Platform.openURL(e.url); | |
// Reset the URL to the initial one | |
webView.url = url; // url is set somewhere in your code | |
} | |
}); |
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
// I am pretty sure there is a sexier approach, but this works nicely | |
var isPhone5 = Ti.Platform.displayCaps.platformHeight == 568; | |
parse568hImages = function(imagePath) { | |
if (isPhone5){ | |
// Do this because the filename could contain dots | |
imagePath = imagePath.replace(".png","[email protected]"); | |
imagePath = imagePath.replace(".jpg","[email protected]"); | |
imagePath = imagePath.replace(".jpeg","[email protected]"); | |
} |