git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| dl { | |
| display: grid; | |
| grid-template-columns: auto 1fr; | |
| grid-gap: .5rem 1rem; | |
| } |
| # | |
| # Powershell script for adding/removing/showing entries to the hosts file. | |
| # | |
| # Known limitations: | |
| # - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
| # | |
| $file = "C:\Windows\System32\drivers\etc\hosts" | |
| function add-host([string]$filename, [string]$ip, [string]$hostname) { |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| <?php | |
| abstract class Collection implements \ArrayAccess, \Iterator | |
| { | |
| private $position; | |
| private $array = []; | |
| public function __construct() { | |
| $this->position = 0; |
| <?php | |
| function return_anon() { | |
| return new class{ | |
| public static $str="foo"; | |
| }; | |
| } | |
| $test=return_anon(); | |
| var_dump($test::$str); |
| <?php | |
| /* | |
| * Before PHP 5.6.0 | |
| */ | |
| function sum() | |
| { | |
| $result = 0; | |
| foreach (func_get_args() as $i) { |
| /** | |
| * Error suppression is still faster than `file_exists`, `is_file` and `is_readable` | |
| * @see https://github.com/doctrine/cache/blob/9930e3367777a8727e229f5126c5299890d700bb/lib/Doctrine/Common/Cache/PhpFileCache.php#L111-L112 | |
| */ | |
| $value = @include $fileName; |
| <?php | |
| class Foo | |
| { | |
| private $a; | |
| private $b; | |
| private $c; | |
| public function __construct($a, $b, $c) |
| <?php | |
| class A | |
| { | |
| protected $protectedProperty = 'secret value of A'; | |
| public function __get($property) | |
| { | |
| return $this->$property; | |
| } |