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
#!/usr/bin/env bash | |
sudo hdiutil create -o /tmp/Monterey -size 16g -volname Monterey -layout SPUD -fs HFS+J | |
sudo hdiutil attach /tmp/Monterey.dmg -noverify -mountpoint /Volumes/Monterey | |
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Monterey --nointeraction | |
hdiutil eject -force /Volumes/Install\ macOS\ Monterey | |
hdiutil convert /tmp/Monterey.dmg -format UDTO -o ~/Downloads/Monterey | |
mv -v ~/Downloads/Monterey.cdr ~/Downloads/Monterey.iso | |
sudo rm -fv /tmp/Monterey.dmg |
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
fio \ | |
--name=random-write-4k \ | |
--ioengine=posixaio \ | |
--rw=randwrite \ | |
--bs=4k \ | |
--size=4g \ | |
--numjobs=1 \ | |
--iodepth=1 \ | |
--runtime=60 \ | |
--time_based \ |
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 concurrent.futures | |
import threading | |
from concurrent.futures import ALL_COMPLETED | |
from queue import Queue | |
from time import sleep | |
from timeit import default_timer as timer | |
import networkx as nx | |
from networking import Crawler, NetworkDisabledException |
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
<head> | |
<script type="text/javascript"> | |
document.onreadystatechange = function(){ | |
if(document.readyState=='loaded' || document.readyState=='complete') | |
alert('XSS'); | |
} | |
</script> | |
</head> |
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
#!/usr/bin/env bash | |
./install-docker.sh | |
./install-php.sh | |
./install-nginx.sh | |
./install-cleanup.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
#!/usr/bin/env bash | |
sudo chown -R $USER:$USER $HOME/.ssh | |
# Base line permission | |
sudo chmod -R 0600 $HOME/.ssh | |
# Not sensible | |
sudo chmod -R 0600 $HOME/.ssh/config | |
sudo chmod -R 0600 $HOME/.ssh/authorized_keys |
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
src |
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 * FROM booking | |
left join booking_room on booking.id = booking_room.booking_id | |
left join room on booking_room.room_id=room.id | |
where checkout < "2021-04-24"; | |
select * from room | |
left join booking_room on room.id = booking_room.room_id | |
LEFT join booking on booking_room.booking_id = booking.id | |
where (booking.checkout < "2021-04-24" or booking.checkout is null) or booking.checkin > "2021-04-24" order by booking.id asc; |
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
$('body').html($('ul.ctopics.topics.bsnewgrid.row').first().html()).removeClass(); |
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
#!/usr/bin/env python3 | |
# Simple Python script to lookup EC2 instance ip addresses based on the name tag. | |
import os | |
import argparse | |
import boto3 | |
from appdirs import user_cache_dir | |
from tabulate import tabulate |