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
# stop instance | |
gcloud compute instances stop YOURINSTANCE --zone=YOURZONE | |
# remove boot disk from instance | |
gcloud compute instances detach-disk YOURINSTANCE --zone=YOURZONE --disk YOURDISK | |
# delete old boot disk | |
gcloud compute disks delete YOURDISK --zone=YOURZONE | |
# find last snapshot |
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
# install ubuntu-desktop | |
# follow https://cloud.google.com/architecture/chrome-desktop-remote-on-compute-engine | |
# put this in /etc/chrome-remote-desktop-session | |
export GNOME_SHELL_SESSION_MODE=ubuntu | |
export XDG_CURRENT_DESKTOP=ubuntu:GNOME | |
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg | |
exec env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu |
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
function main() { | |
findSharedDocuments("[email protected]"); | |
} | |
function findSharedDocuments(email) { | |
var files = DriveApp.searchFiles('("' + email + '" in readers OR "' + email + '" in writers) AND NOT ("' + email + '" in owners)'); | |
var success = 0; | |
while (files.hasNext()) { | |
var file = files.next(); | |
try { |
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 | |
echo "time_total: %{time_total}\n" > curl_format.txt | |
dd if=/dev/urandom of=data.txt bs=100K count=1 | |
while true; do curl -X POST -w "@curl_format.txt" -d @data.txt -s https://requestb.in/1j4ph411; done; |
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
# copied from default config | |
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
# if you're running mac osx inside a vmware virtual machine, mounting an iphone into it can be cumbersome because ubuntu always claims the device for itself. | |
# sometimes it still works to mount it into the vm, but most of the time it doesn't. | |
# to fix that we simply never mount apple-devices on our ubuntu host, so that vmware is able to claim them for the guest. | |
# this ignores all apple usb-devices on your ubuntu host! | |
echo 'ATTRS{idVendor}=="05ac", ENV{UDISKS_IGNORE}="1"' | sudo tee /etc/udev/rules.d/100-local.rules | |
sudo udevadm control --reload-rules && sudo udevadm trigger |
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 | |
# install node | |
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
sudo apt-get install git nodejs --yes | |
# fix npm permissions: https://docs.npmjs.com/getting-started/fixing-npm-permissions | |
mkdir ~/.npm-global | |
npm config set prefix '~/.npm-global' | |
echo "export PATH=~/.npm-global/bin:\$PATH" >> ~/.profile |
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
depending on your specific scenario you might want to try to inject one of those: | |
<img onerror="window.alert('hey')" src="bla"/> | |
<svg><script>alert(/hey/.source)</script></svg> | |
<img onerror="window.onerror=alert;throw 'hey'" src="bla"/> | |
<script>window.onerror=alert;throw "hey";</script> | |
inspiration: |
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 | |
sudo apt-get update --yes | |
sudo apt-get upgrade --yes | |
curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh | |
sudo bash install-logging-agent.sh | |
sudo rm install-logging-agent.sh | |
sudo apt-get install git default-jdk maven --yes |
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 | |
logger "started" | |
sudo apt-get update --yes | |
sudo apt-get upgrade --yes | |
cd worker/ | |
git clean -fdx | |
git checkout master |
NewerOlder