This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
#import <Foundation/Foundation.h> | |
#import "RCTBridgeModule.h" | |
#define RCT_EXTERN_MODULE(objc_name, objc_supername) \ | |
RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername) | |
#define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \ | |
objc_name : objc_supername \ | |
@end \ | |
@interface objc_name (RCTExternModule) <RCTBridgeModule> \ |
SSH into Root
$ ssh [email protected]
Change Root Password
<?php | |
$url = array ( | |
'http://youtu.be/dQw4w9WgXcA', | |
'http://www.youtube.com/embed/dQw4w9WgXcB', | |
'http://www.youtube.com/watch?v=dQw4w9WgXcC', | |
'http://www.youtube.com/?v=dQw4w9WgXcD', | |
'http://www.youtube.com/v/dQw4w9WgXcE', | |
'http://www.youtube.com/e/dQw4w9WgXcF', | |
'http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcG', |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
namespace :db do | |
def detect_env | |
ENV['RAILS_ENV'] || 'development' | |
end | |
def truncate(table) | |
begin | |
case @config["adapter"] | |
when "mysql", "mysql2" | |
ActiveRecord::Base.connection.execute("TRUNCATE #{table}") | |
puts "Table #{table} truncated!" |
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |