/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install -f git jq jo telnet wget nmap
brew install -f adr-tools php composer imagemagick ffmpeg exiftool
#!/usr/bin/php | |
<?php | |
$iloop = "0"; | |
while (true){ | |
$warn = "Program running hold on!!\r"; | |
if (strlen($warn) === $iloop+1){ | |
$iloop = "0"; | |
} | |
$warn = str_split($warn); |
tail -n +2 file.sql > newfile.sql |
mysqldump -h host_ip -u user -ppassword database_name > database_dump.sql | |
mysqldump -h host_ip -u user -ppassword database_name table_name > table_dump.sql | |
mysqldump -h host_ip -u user -ppassword database_name table_name --where="date_created='2019-04-19'" > rows_dump.sql | |
Big table, use nohup command & | |
If user is not root, you may add --lock-tables=false |
const http = require('http'); | |
const cluster = require('cluster'); | |
if (cluster.isMaster) { | |
console.info('Starting...'); | |
console.info('Worker master started'); | |
const numCpus = require('os').cpus().length; |
git archive --remote=[email protected]:XXX/XXX.git HEAD:path/ FILE.sql | tar -x
-- All Databases and Tables | |
SELECT | |
table_schema AS `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM | |
information_schema.TABLES | |
ORDER BY | |
(data_length + index_length) | |
DESC; |
<?php | |
$regex = "/(?'group1'[0-9]+)_(?'group2'.+)_(?'group3'[0-9A-Z]+).(?'ext'.+)$/"; | |
$files = [ | |
'01_lero_1X.pdf', | |
'02_lerolero_13.pdf', | |
'03_1k_KK.pdf' | |
]; |