Github will be the main account and bitbucket the secondary.
ssh-keygen -t rsa -C "github email"
Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.
| <?php | |
| DB::table('rooms') | |
| ->whereNotIn('room_id', function($query) | |
| { | |
| $query->select('room_id') | |
| ->from(with(new Booking)->getTable()) | |
| ->where(function($query) | |
| { | |
| $query->where('time_out', '<', '2012-09-14T18:00') | |
| ->orWhere('time_in', '>', '2012-09-21T09:00'); |
| ##################### Elasticsearch Configuration Example ##################### | |
| # This file contains an overview of various configuration settings, | |
| # targeted at operations staff. Application developers should | |
| # consult the guide at <http://elasticsearch.org/guide>. | |
| # | |
| # The installation procedure is covered at | |
| # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. | |
| # | |
| # Elasticsearch comes with reasonable defaults for most settings, |
| import UIKit | |
| import StoreKit | |
| //MARK: SKProductsRequestDelegate | |
| extension IAPHelpers : SKProductsRequestDelegate | |
| { | |
| func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) | |
| { |
Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask
If you already have Java installed on your system, skip steps Install Cask and Install Java
If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"| #!/usr/bin/env bash | |
| echo "Written By Ankur Mishra" | |
| echo "Starting Server Setup....." | |
| echo "Be Sure you are are a super user..." | |
| # To become a super user | |
| sudo su | |
| # to update the packages from repositories | |
| apt-get update |
Simple Laravel 5.2 stack with web serer (php-fpm) and db drivers
| <?php | |
| // curl -sS https://getcomposer.org/installer | php | |
| // php composer.phar require aws/aws-sdk-php | |
| // export AWS_ACCESS_KEY_ID=... | |
| // export AWS_SECRET_ACCESS_KEY=... | |
| $streamName = '<INSERT_YOUR_STREAMNAME_HERE>'; | |
| $numberOfRecordsPerBatch = 10000; |
| ######## Installing MongoDB ############## | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
| echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
| sudo apt-get update | |
| sudo apt-get install -y mongodb-org | |
| service mongod start | |
| service mongod status |
| #!/bin/sh | |
| # Make sure to: | |
| # 1) Name this file `backup.sh` and place it in /home/ubuntu | |
| # 2) Run sudo apt-get install awscli to install the AWSCLI | |
| # 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
| # 4) Fill in DB host + name | |
| # 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
| # 6) Run chmod +x backup.sh | |
| # 7) Test it out via ./backup.sh |