Skip to content

Instantly share code, notes, and snippets.

@cesarkohl
cesarkohl / gulpfile.js
Created August 1, 2019 00:15
Gulp / Pug
var gulp = require('gulp');
var pug = require('gulp-pug');
var less = require ('gulp-sass');
gulp.task('pug', function() {
return gulp
.src('*/*.pug')
.pipe(pug())
.pipe(gulp.dest('build'));
});
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class Car {
public $color = 'White';
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class Car {
private $color = 'White';
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class Car {
protected $color = 'White';
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class BankAccount {
private $agency;
private $account;
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class Person {
protected $name = 'No Name';
private $birthYear = 'No Year';
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class Father {
// Property
public $lastName;
@cesarkohl
cesarkohl / gist:fe66ff6d059f9a88ce6eb1c4c74e853d
Created August 12, 2019 12:29
Revert php artisan serve
press ctrl+ c
> lsof -i :8000
to check if the port is busy or not if any process is listening to the port 8000 it will be displayed with port id
> sudo kill -9 [PID]
kill the process that listen to that port id
run lsof agin
var fruits = ['pineapple', 'apple', 'grape'];
for (var i = 0; i <fruits.length; i ++) {
// iteration body
}
var names = ['adam', 'brian', 'charles'];
for (var i = 0; i <names.length; i ++) {
console.log (names [i]);
}
// adam, brian, charles