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: /usr/local/directadmin/data/templates/custom/cust_openlitespeed.CUSTOM.5.pre | |
### | |
# block all access to wordpress xmlrpc.php and wp-trackback.php file | |
RewriteRule ^/(wp-config|wp-config-sample|xmlrpc|wp-trackback)\.php - [F,L,NC] | |
# Patch for CVE-2023-40000 | |
# https://wpscan.com/vulnerability/dd9054cc-1259-427d-a4ad-1875b7b2b3b4/ |
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
name: Build Image | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: |
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
read -r YN | |
YN=$(printf '%s' "$YN" | tr '[:upper:]' '[:lower:]') | |
case "$YN" in | |
y | yes ) | |
;; | |
* ) | |
exit 1 | |
;; | |
esac |
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
// Get all the tables from your database | |
$tables = \DB::select('SELECT table_name FROM information_schema.tables WHERE table_schema = \'public\' ORDER BY table_name;'); | |
// Set the tables in the database you would like to ignore | |
$ignores = array('admin_setting', 'model_has_permissions', 'model_has_roles', 'password_resets', 'role_has_permissions', 'sessions'); | |
//loop through the tables | |
foreach ($tables as $table) { | |
// if the table is not to be ignored then: |
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 | |
# https://cloud.google.com/compute/docs/faq#find_ip_range | |
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
myarray=() | |
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
do | |
myarray+=($LINE) | |
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
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
We need to use ProxyCommand option of ssh client like this: | |
`ProxyCommand /usr/bin/nc -x SOCKS5_PROXY_HOST:SOCKS5_PROXY_PORT %h %p` | |
The ssh command is something like this: | |
ssh SSH_USER@SSH_HOST -o "ProxyCommand /usr/bin/nc -x SOCKS5_PROXY_HOST:SOCKS5_PROXY_PORT %h %p" | |
for example: | |
ssh -T [email protected] -o "ProxyCommand /usr/bin/nc -x 127.0.0.1:9050 %h %p" |
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
curl_time() { | |
curl -so /dev/null -w "\ | |
namelookup: %{time_namelookup}s\n\ | |
connect: %{time_connect}s\n\ | |
appconnect: %{time_appconnect}s\n\ | |
pretransfer: %{time_pretransfer}s\n\ | |
redirect: %{time_redirect}s\n\ | |
starttransfer: %{time_starttransfer}s\n\ | |
-------------------------\n\ | |
total: %{time_total}s\n" "$@" |
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 | |
################################ | |
# OS X Install ISO Creater # | |
# # | |
# Author: shela # | |
################################ | |
####################################### | |
# Declarations |
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/sh | |
aria2c --dir=./ --input-file=urls.txt --max-concurrent-downloads=1 --connect-timeout=60 --max-connection-per-server=16 --split=16 --min-split-size=1M --human-readable=true --download-result=full --file-allocation=none | |
date | |
# Now create this file in the same directory and paste all urls in it: urls.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 | |
namespace App\Console\Commands; | |
use RuntimeException; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\ConfirmableTrait; | |
class KeyGenerateCommand extends Command | |
{ |
NewerOlder