In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
<?php | |
/** | |
* @var \CodeIgniter\Pager\PagerRenderer $pager | |
*/ | |
$pager->setSurroundCount(2); | |
?> | |
<nav aria-label="<?= lang('Pager.pageNavigation') ?>"> | |
<ul class="pagination"> |
<?php | |
/** | |
* @param string $content | |
* | |
* @return string | |
*/ | |
function purify(string $content) : string | |
{ | |
$config = \HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.AllowedElements', [ |
$ sudo apt update | |
Obter:1 http://deb.debian.org/debian buster InRelease [122 kB] | |
Err:1 http://deb.debian.org/debian buster InRelease | |
As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 | |
Lendo listas de pacotes... Pronto | |
W: Erro GPG: http://deb.debian.org/debian buster InRelease: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 | |
E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed. | |
N: Updating from such a repository can't be done securely, and is therefore disabled by default. | |
N: See apt-secure(8) manpage for repository creation and user configuration details. |
<?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)); | |
} |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
<?php | |
// https://3v4l.org/gDRdq | |
$foo = 'a/b/c/d/e'; | |
$bar = null; | |
$m = memory_get_usage(); | |
$t = microtime(true); | |
for($i = 0; $i < 10000; $i++) | |
{ |
<?php | |
//https://3v4l.org/IoNmr | |
$dir = null; | |
$m = memory_get_usage(); | |
$t = microtime(true); | |
for($i = 0; $i < 10000; $i++) | |
{ | |
$dir = \dirname('/etc/crontab'); |