Skip to content

Instantly share code, notes, and snippets.

FROM php:7.0-apache
RUN apt-get update
RUN apt-get install network-manager libnss3-tools jq xsel sudo git -y
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/bin/composer
RUN adduser valetuser
docker volume create --name data
docker run -d -v //var/run/docker.sock:/var/run/docker.sock -v data:/build --name jenkins -p 6060:8080 -p 50000:50000 jenkins
docker exec -it -u root jenkins bash
npm install browser-sync gulp --save-dev
var gulp        = require('gulp');
var browserSync = require('browser-sync').create();

gulp.task('reload', function (done) {
    browserSync.reload();

Try the Code

<?php

interface IUser
{
    function changePassword( $password );
}

class User implements IUser
<?php

/**
 * AppRquest Class
 * File: App/Http/Requests/AppRequest.php
 */
 
namespace App\Http\Requests;
use Illuminate\Http\JsonResponse; 

class JsonEmptyResponse extends JsonResponse 
{ 
     
    public function __construct() 
    { 
         
        $data = [ 
<?php

class CacheDecorater
{
    function decorate( $tweet )   
    {
        $tweet->cached = true;
        return $tweet;
    }
umask (002)
0 0 2 = 000 000 010
Not 0 0 2 = 111 111 101
110 110 110 AND
111 111 101 =
110 110 100
rw- rw- r--
############
umask (022)
@nezarfadle
nezarfadle / simple_php_template_engine.md
Last active May 26, 2017 08:43
How to use PHP Closure to write a simple template engine

File: index.php

class Article
{
    private $title = "This is an article";
}