Go through this amazon link http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
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
#pragma mark - SearchBar delegate methods | |
- (void) doSearch:(NSString *)searchText { | |
[self.filteredEntries removeAllObjects]; | |
if ( [searchText length] == 0 ) { | |
[self.filteredEntries addObjectsFromArray:self.entries]; | |
} else { | |
for (NSDictionary *entry in self.entries) { | |
NSString *name = (NSString *)[entry objectForKey:@"fullName"]; |
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
How to disable auto-save: | |
Go to File > Settings (Ctrl+Alt+S). | |
Go to Appearance & Behavior > System Settings. | |
Make sure the two are unchecked: | |
Save files on frame deactivation | |
Save files automatically if application is idle for x sec. | |
Go to Editor > General > Editor Tabs | |
Put a checkmark on "Mark modified files with asterisk" | |
(Optional but recommended) Under "Tab Closing Policy", select "Close non-modified files first". You may also want to increase the number of allowed tabs. | |
Click Apply > OK. |
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
#!/usr/bin/env bash | |
# vim: ai ts=2 sw=2 et sts=2 ft=sh | |
# Check OS. | |
if [[ ! "${OSTYPE}" =~ "^linux" ]] || [[ ! "$(lsb_release -c 2>/dev/null)" =~ "xenial" ]]; then | |
(>&2 echo "Error: This script is for Ubuntu 16.04 LTS (xenial) not '${OSTYPE}'.") | |
exit 1; | |
fi | |
sudo apt-get update |
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
from flask import Flask | |
from flask_restful import Api, Resource, reqparse | |
app = Flask(__name__) | |
api = Api(app) | |
users = [ | |
{ | |
"name": "Nicholas", | |
"age": 42, |
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
import boto3 | |
from PIL import Image | |
from io import BytesIO | |
import os | |
class S3ImagesInvalidExtension(Exception): | |
pass | |
class S3ImagesUploadFailed(Exception): | |
pass |
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
"use strict"; | |
require("dotenv").config(); | |
/** | |
* An asynchronous bootstrap function that runs before | |
* your application gets started. | |
* | |
* This gives you an opportunity to set up your data model, | |
* run jobs, or perform some special logic. | |
* | |
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#bootstrap |
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
import boto3 | |
from PIL import Image | |
from io import BytesIO | |
import os | |
class S3ImagesInvalidExtension(Exception): | |
pass | |
class S3ImagesUploadFailed(Exception): | |
pass |