setup local repo
mkdir myrepository
cd myrepository
git init
add bitbucket remote as "origin"
# Get root: | |
sudo su | |
# Install prerequisites: | |
apt-get install build-essential pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev | |
# Build libevent from source: | |
cd /usr/local/src |
Model:: | |
/*Select*/ | |
select('col1','col2') | |
->select(array('col1','col2')) | |
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
->addSelect('col3','col4') | |
->distinct() // distinct select | |
/*From*/ |
#include "FastLED.h" | |
// TwoAnimationsAtTheSameTime | |
// Example showing one way to run two different animations on | |
// two different parts of one LED array at the same time. | |
// | |
// The three keys to success here are: | |
// | |
// 1. Move the drawing of each animation into a separate 'draw' function, | |
// each of which is called from 'loop()'. Each 'draw' function draws |
<?php | |
namespace App\Providers; | |
use League\Flysystem\Sftp\SftpAdapter; | |
use Storage; | |
use League\Flysystem\Filesystem; | |
use Illuminate\Support\ServiceProvider; | |
/** |
<?php | |
namespace App\Authentication; | |
use Auth; | |
use App\Authentication\UserProvider; | |
use Illuminate\Support\ServiceProvider; | |
class AuthServiceProvider extends ServiceProvider | |
{ |
container_commands: | |
... | |
04_nodejs_install: | |
command: curl --silent --location https://rpm.nodesource.com/setup_4.x | sudo bash - && yum install nodejs -y | |
05_npm_build: | |
command: cd /var/app/ondeck && sudo npm install && node ./node_modules/webpack/bin/webpack.js -p |
RUN apt update | |
RUN apt upgrade -y | |
RUN apt install -y apt-utils | |
RUN a2enmod rewrite | |
RUN apt install -y libmcrypt-dev | |
RUN docker-php-ext-install mcrypt | |
RUN apt install -y libicu-dev | |
RUN docker-php-ext-install -j$(nproc) intl | |
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
This is an example of a web that uses a remote API as a database wrapper.
The remote API is stateless and the web uses cookies to maintain session persistence.
The API authentication endpoint returns a TOKEN that allows the web to make each request to the API with the user authentication header.
Este es un ejemplo de web que usa una API remota como wrapper de base de datos.