-
Регулярные выражения, Дж. Фридл, 3-е издание
-
Разгони свой сайт, Н. Мациевский
-
Самоучитель Java 2, Ильдар Хабибуллин
-
Применение UML 2.0 и шаблонов проектирования, К. Ларман
-
CNE 050-63 Network Technologies
-
ActionScript, Шэм Бангал
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 | |
/** | |
* 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( |
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:
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
git reset --soft HEAD~3 | |
git commit -m 'new commit message' |
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
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(''); | |
} |
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
// Laravel | |
Route::get('user/{id}', 'UserController@showProfile'); | |
// Yii | |
'user/<id>' => 'user/profile', |
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
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 |
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
<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> |
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
public static function assertArrayStructure($keys, $array) | |
{ | |
$arrayKeys = array_keys($array); | |
$missing = array_diff($keys, $arrayKeys); | |
$unexpected = array_diff($arrayKeys, $keys); | |
$message = 'Keys are wrong.'; | |
if ($missing !== []) { | |
$message .= ' Missing: ' . implode(', ', $missing) . '.'; |
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
-- Cleans up IPB 3 database before importing it into another forum engine | |
-- tbl_* are project specific, could be removed | |
-- Remove banned members and members with no posts | |
delete m | |
from ipb_members m | |
left join tbl_user u on u.id = m.member_id | |
where | |
( | |
member_banned = 1 |