View 01-ab.sh
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
#!/bin/bash | |
set -e | |
URL="http://localhost/laravel/public/test" | |
rm -rf vendor storage/logs/*.log | |
composer install --no-scripts --no-dev && composer install --no-dev --optimize-autoloader --classmap-authoritative |
View twitterFollowerCuratorBot.php
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 | |
// | |
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio) | |
// | |
// https://gist.github.com/levelsio/6ee6c47283ee414ef3aace1d81986717 | |
// | |
// File: twitterFollowerCuratorBot.php | |
// | |
// Created: May 2021 |
View install-server-nginx-php-mysql.sh
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
#!/bin/bash | |
if [ "`whoami`" != 'root' ]; then | |
echo "" | |
echo "This script only can be executed by root" | |
echo "" | |
exit 1 | |
fi |
View git-gc.sh
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
#!/bin/bash | |
e () { | |
echo -e "$(date '+%Y-%m-%d %H:%M:%S'): $1" | |
} | |
echo "" | |
BASE="$1" |
View exit.html
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
<a href="https://google.es" id="salida">Google!</a> | |
<script> | |
var a = document.getElementById('salida'); | |
a.addEventListener('click', function(e) { | |
e.preventDefault(); | |
window.open(a.href, '_blank').focus(); | |
window.location.replace(a.href); |
View download.php
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 | |
/** | |
* @param string $html | |
* | |
* @return \DOMDocument | |
*/ | |
function dom(string $html): DOMDocument | |
{ | |
libxml_use_internal_errors(true); |
View postgresql-stats.sql
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
SELECT N.nspname || '.' || C.relname AS "relation", | |
S.n_live_tup AS "rows", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "data_size", | |
pg_size_pretty(pg_indexes_size(C.oid)) AS "index_size", | |
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace AS N ON (N.oid = C.relnamespace) | |
LEFT JOIN pg_stat_user_tables S ON (S.relname = C.relname) | |
WHERE ( | |
N.nspname NOT IN ('pg_catalog', 'information_schema') |
View stats.sh
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
#!/bin/bash | |
set -euo pipefail | |
function awsSort { | |
awk '{ | |
for(i=1; i<=NF; ++i) | |
if ($i ~ /^(time|memory|cpu)=/) { | |
split($i, f, "="); |
View App-Providers-Debug.php
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 declare(strict_types=1); | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use App\Services\Mail\Logger as LoggerMail; | |
class Debug extends ServiceProvider | |
{ | |
/** |
View App-Providers-Debug.php
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 declare(strict_types=1); | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use App\Services\Database\Logger as LoggerDatabase; | |
class Debug extends ServiceProvider | |
{ | |
/** |