These steps were made with Ubuntu 14.04 e ruby 2.2.2. To enjoy the ease of step-by-step, I suggest not change folders and application name - just change the server ip and git
# Server console
sudo adduser deployer
sudo gpasswd -a deployer sudo
module.exports = function (app, db) { | |
var module = {}; | |
module.auth = function (req, res) { | |
// This will be available 'outside'. | |
// Authy stuff that can be used outside... | |
}; | |
// Other stuff... | |
module.pickle = function(cucumber, herbs, vinegar) { |
#!/bin/bash | |
cV=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE") | |
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
b=${bN##*.} | |
bN=$((b += 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $cV.$bN" "$INFOPLIST_FILE" |
I've just installed ionic and I used this syntax to select the device to emulate: | |
ionic emulate ios --target="iPhone-4s" | |
To find out available emulations I run this: | |
ios-sim showdevicetypes | |
This command will return a list something like this: | |
iPhone-4s, 8.4 | |
iPhone-5, 8.4 |
#import <Contacts/Contacts.h> | |
@implementation ContactsScan | |
- (void) contactScan | |
{ | |
if ([CNContactStore class]) { | |
//ios9 or later | |
CNEntityType entityType = CNEntityTypeContacts; | |
if( [CNContactStore authorizationStatusForEntityType:entityType] == CNAuthorizationStatusNotDetermined) |
#!/bin/bash | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=`echo $buildNumber +1|bc` | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" |
#!/bin/bash | |
TAGS="TODO:|FIXME:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" |
bash | |
sudo vagrant up |
# show all processes | |
lsof -wni tcp:3000 | |
# kill process | |
kill -9 NUMBER_OF_PROCESS |
# http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-cmd-commands.html | |
# http://stackoverflow.com/questions/31171048/how-do-i-change-users-in-the-eb-cli | |
# add this lines in ~/.aws/config | |
[PROFILE_NAME] | |
aws_access_key_id = xxx | |
aws_secret_access_key = xxx | |
# and init | |
eb init --profile PROFILE_NAME |