This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recurses each directory and runs PHP's lint function against each file | |
* to test for parse errors. | |
* | |
* @param string $dir the directory you would like to start from | |
* @return array the files that did not pass the test | |
*/ | |
function lint( $dir = 'C:\dev\\' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Shape = { | |
Triangle: new Symbol() | |
}; | |
// Demo func | |
function getArea(shape, options) { | |
var area = 0; | |
switch (shape) { | |
case Shape.Triangle: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g prefix C-a | |
unbind-key C-b | |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
silex.model.Widget.register(function(model, view, controller) { | |
return { | |
title: 'Align tool', | |
description: 'This widget displays buttons to align selected elements.', | |
selection: [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ubuntu 22.04 | |
# Please also allow `80, 443, 3000` ports in the VM network rules if apply | |
# run as sudo | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root or use sudo" | |
exit | |
fi |