-
Kanban Pragmático
-
Design Responsivo
-
Big Data 2013: Concepts, Techniques and Tools
-
Scala Aplicado
This file contains 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 | |
$token = bin2hex(openssl_random_pseudo_bytes(54 | |
)); | |
echo $token; |
This file contains 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 | |
$generateToken = function($length = 50) { | |
$token = ""; | |
$string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
$maxNumbers = strlen($string); | |
$i = 0; | |
while ($i < $length) { |
This file contains 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 | |
// AppBundle/Handler/SessionIdleHandler.php | |
namespace AppBundle\Handler; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpFoundation\Session\SessionInterface; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
use Symfony\Component\Routing\RouterInterface; | |
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
ctrl g
informa a sua localização no arquivo.G
leva o cursor para última linha do arquivo.gg
leva o cursor para primeira linha do arquivo.13 G
leva o cursor para linha 13. ps: Digitando qualquer número no lugar do 13, te leva para a linha digitada.
/padrão
vai buscar por uma incidência da palavra padrão no texto. Troque padrão por qualquer outra palavra que você queira encontrar.
This file contains 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
1. Install nodejs. https://nodejs.org/en/ | |
2. Check npm (node package manager) is installed via command prompt: | |
$ npm | |
3. Install gulp: | |
$ npm install gulp --global | |
4. In relevant project folder, create 'gulpfile.js': |
This file contains 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
$file = new SplFileObject("filename.txt"); | |
$file->seek(9); // so it's line 10 | |
echo $file->current(); // outputs line 10 |
This file contains 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
$linesIterator = new LimitIterator( | |
new SplFileObject("filename.txt"), | |
9, // start at line 10 | |
20 // iterate 20 lines | |
); | |
foreach ($linesIterator as $line) { | |
echo $line; // outputs line 10 to 30 | |
} |
This file contains 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
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |