Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <?php | |
| // See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html | |
| // Start a session (which should use cookies over HTTP only). | |
| session_start(); | |
| // Create a new CSRF token. | |
| if (! isset($_SESSION['csrf_token'])) { | |
| $_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32)); | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
Apache configuration file
Add mod_rewrite and .htaccess support for your site At the end of the configuration files add these lines:
#My site mod_rewrite configuration
<Directory "/ABSOLUTE/PATH/YourSite">
AllowOverride All
| <?php | |
| class PageController extends \App\Http\Controllers\Controller | |
| { | |
| public function show() | |
| { | |
| $slug = request()->segment(1); | |
| $page = \TCG\Voyager\Models\Page::where('slug', $slug) | |
| ->firstOrFail(); | |
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)| javascript:var path=window.location.pathname;if("www.tiktok.com"===window.location.hostname){var split=path.split("/")[2];"video"===split&&window.open(document.querySelectorAll("._video_card_")[2].currentSrc)}else console.log(null); |