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
def is_number(s): | |
"""Test if the passed string contains a number @ position 0""" | |
try: | |
float(s) | |
return True | |
except ValueError: | |
return False |
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
--- <yourproject.js> --- | |
SubscriptionOne = new Meteor.Collection('subscription1'); | |
SubscriptionTwo = new Meteor.Collection('subscription2'); | |
if(Meteor.isClient) { | |
// iron:router route | |
Router.route('/', { | |
onBeforeAction:function() { | |
// .. any onBeforeAction |
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
// Redirect users who arent logged in... | |
function login_redirect() { | |
// Current Page | |
global $pagenow; | |
// Check to see if user in not logged in and not on the login page | |
if(!is_user_logged_in() && $pagenow != 'wp-login.php') | |
// If user is, Redirect to Login form. | |
auth_redirect(); |
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
ssh-copy-id 'user@remotehost' # Automatically installs your public key to the remote host (this is included in the openssh package) |
NewerOlder