I hereby claim:
- I am samdark on github.
- I am samdark (https://keybase.io/samdark) on keybase.
- I have a public key whose fingerprint is 22C9 A490 0E05 7C30 6A9D C678 F1AE 38B2 A108 39BF
To claim this, I am signing this object:
<scheme name="Sam Dark" version="142" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.05" /> | |
<option name="EDITOR_FONT_SIZE" value="15" /> | |
<option name="EDITOR_LIGATURES" value="true" /> | |
<option name="CONSOLE_FONT_NAME" value="Monospaced" /> | |
<option name="CONSOLE_FONT_SIZE" value="13" /> | |
<option name="EDITOR_FONT_NAME" value="Fira Code" /> | |
<colors> | |
<option name="WHITESPACES" value="f2f2f2" /> | |
</colors> |
git checkout -b local-branch-name master | |
git pull https://github.com/username/repo.git remote-branch-name | |
git --no-pager show -s --format='%an <%ae>' FETCH_HEAD | |
git merge --squash local-branch-name | |
git commit -am 'commit message' --author="author name <[email protected]>" | |
git push origin master |
// Laravel | |
Route::get('user/{id}', 'UserController@showProfile'); | |
// Yii | |
'user/<id>' => 'user/profile', |
function unhash(hash) { | |
var parts = []; | |
var letters = 'acdegilmnoprstuw'; | |
while (hash !== 7) { | |
var index = hash % 37; | |
hash = (hash - index) / 37; | |
parts.unshift(letters[index]); | |
} | |
return parts.join(''); | |
} |
git reset --soft HEAD~3 | |
git commit -m 'new commit message' |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* DuplicateFilter prevents Yii from exposing URLs starting with /index.php/ when showScriptName is false. Such | |
* URLs are automatically redirected to proper ones. | |
* | |
* To use add the following to your controller: | |
* | |
* ```php | |
* public function filters() { | |
* return array( |
<?php | |
$db = new PDO('mysql:host=localhost;dbname=rmc2', 'root'); | |
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
function benchmark($callback){ | |
$start = microtime(true); | |
for ($i = 0; $i < 100; $i++) | |
$callback(); | |
return microtime(true) - $start; | |
} |
<?php | |
class Wrapper { | |
private $value; | |
private $isHit; | |
function __construct($isHit, $value) | |
{ | |
$this->isHit = $isHit; | |
$this->value = $value; | |
} |