show dbs
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
import _ from "lodash"; | |
// Lodash search function | |
export const searchByQuery = (collection, query, include) => { | |
query = _.toLower(query); | |
return _.filter(collection, function (object) { | |
return _(object) | |
.pick(include) | |
.some((string) => { | |
return _(string).toLower().includes(query); |
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
import _ from "lodash"; | |
// Lodash search function | |
export const searchByQuery = ( | |
collection: object[], | |
include: string[], | |
query: string | |
): any[] => { | |
query = _.toLower(query); | |
return _.filter(collection, function (object) { |
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
GENERATE PROJECT: | |
> composer create-project symfony/skeleton "project_name" | |
> composer create-project symfony/website-skeleton "project_name" | |
COMPOSER COMMANDS: | |
> composer update |
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
wget https://getcomposer.org/installer | |
chmod +x installer && php ./installer | |
mv composer.phar /usr/local/bin/composer | |
echo 'export PATH="~/.config/composer/vendor/bin:$PATH"' >> .bashrc | |
rm -f installer | |
--- Windows Powershell [Administrator] | |
choco install php composer nvm sqlite mysql | |
--- |
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
const fs = require("fs"); | |
const puzzleInput = "172851-675869"; | |
const RANGE = puzzleInput.split("-"); | |
const LOWER = RANGE[0].length === 6 ? parseInt(RANGE[0]) : 0; | |
const HIGHER = RANGE[1].length === 6 ? parseInt(RANGE[1]) : 0; | |
if (!LOWER || !HIGHER) return; | |
let possiblePasswords = []; | |
if (fs.existsSync("./passwords.txt")) { | |
fs.unlinkSync("./passwords.txt"); |
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 | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$database = 'db'; | |
$user = 'user'; | |
$pass = 'pass'; | |
$host = 'localhost'; |