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
[ | |
{ | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "DENY" | |
}, { | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "ALLOW", | |
"property": "create" |
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
/** | |
* Cleanup auth user info from local storage | |
*/ | |
func cleanup_auth_user_from_local_storage(){ | |
let authenticated_user_info = load_auth_user_info() | |
if (authenticated_user_info != nil){ | |
let managed_object_context = app_delegate.managed_object_context | |
managed_object_context.deleteObject(authenticated_user_info!) | |
app_delegate.save_context(nil) | |
} |
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
private func keep_user_info_into_local_storage(json: JSON){ | |
// If success, store the returned credential into Core.Data | |
// 1. Try to retrieve existing record | |
let managed_object_context = app_delegate.managed_object_context | |
// 2. Fetch AuthenticatedUser record | |
let fetch_request = NSFetchRequest(entityName: "AuthenticatedUser") | |
// 3. Execute fetch request |
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
// MARK: - Core Data Stack | |
// Define application's document directory | |
lazy var applicationDocumentsDirectory: NSURL = { | |
let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) | |
return urls[urls.count-1] | |
}() | |
// Define Managed Object Model | |
lazy var managed_object_model :NSManagedObjectModel = { |
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
Detailed steps for the setup can be viewed in this link: | |
http://www.iamafishnow.com/2014/11/02/set-up-smtp-gmail-to-work-with-php-mail-on-osx-yosemite/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<title></title> | |
<link href="css/style.css" rel="stylesheet"> | |
<!-- angularjs js --> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<title></title> | |
<link href="css/style.css" rel="stylesheet"> | |
<!-- angularjs js --> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> | |
<style> | |
table, th, td { | |
border: 1px solid grey; | |
border-collapse: collapse; | |
} | |
th, td{ |
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
# This file is usually placed in this following path: /etc/nginx | |
user nginx; | |
#user root; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; |
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
I. Create a java project using Maven: | |
------------------------------------- | |
1. Run command: mvn archetype:generate. | |
2. On the next displayed prompt, press [ENTER]. | |
3. At next prompt, enter 1-6 option on the prompt. Enter the highest option number (e.g. 6). | |
4. Enter 'groupId' on the next prompt (e.g. com.mycompanyname). | |
5. Enter 'artifactId' on the next prompt (e.g. myapplicationname). | |
6. Enter 'packageName' on the next prompt (e.g. com.mycompanyname). | |
7. Enter 'version' on the next prompth (e.g. 1.0.0). | |
8. Run this command to ensure that your java project has been created successfully: |
NewerOlder