This is a set of instructions to setup a Django Nginx Gunicorn MySQL/Postgres stack on a single Amazon EC2 instance.
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
# import ViewControllerNameWindow.h in the file .h (header) | |
# add property in the controller | |
@property (nonatomic, strong) ModalController *modal; | |
# Create method for lauch the modal view in the current content view controller .m | |
- (IBAction)btnShowModal:(id)sender { | |
//Show wifi settings to customer |
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
$.ajax({ | |
type : 'POST', | |
url : 'http://localhost/api/get/all', | |
data : {'token': 'some string'}, | |
dataType: 'JSON', | |
cache : false, | |
beforeSend : function(){ | |
//Before to send request do a animation | |
// ... | |
}, |
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 definition | |
def generate_public_key(self): | |
#import libs | |
import string | |
import random | |
# make magic | |
k = ''.join([random.choice(string.ascii_letters + string.digits) for n in xrange(255)]) | |
#return the value |
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
## IMPORT THE DATETIME MODULE | |
import datetime | |
## CONVERT THE RAW STRING WITH STRFTIME METHOD | |
print( | |
datetime.datetime.fromtimestamp( | |
int("1284101485") | |
).strftime('%Y-%m-%d %H:%M:%S') |
This file will help you to init project with Xcode and Objective C with pagage manager Cocoapods. The head first are make sure that we have installed Cocoapods on our system.
IMPORTANT: Make sure you have ruby cli installed on your system.
sudo gem install cocoapods
After have installed cocoapods, you have to export the environment vars for your system can to recognize cocoapods cli.
#How to use NSURLSession
+ (NSURLSessionDataTask *)postCall:(NSDictionary *)parameters fromURL:(NSString *)url completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler {
// create your request here ...
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:urlRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (completionHandler)
e.g. when entering the number "1234.56".
-
$ 0.00.
-
$ 0.01.
-
$ 0.12.
-
$ 1.23.