Skip to content

Instantly share code, notes, and snippets.

View sscarduzio's full-sized avatar

Simone Scarduzio sscarduzio

View GitHub Profile
@sniper7kills
sniper7kills / ELK-install.sh
Last active February 7, 2020 02:13
ELK-Install-Ubuntu-16.04
#/bin/bash
#Ask some info
echo -n "Enter ELK Server IP or FQDN: "
read eip
echo -n "Enter Admin Web Password: "
read adpwd
#Update System
sudo apt-get update
sudo apt-get upgrade -y
@raghothams
raghothams / server.py
Created February 22, 2016 10:10
Flask request header decorator
from functools import wraps
from flask import Flask, request
app = Flask(__name__)
key = "ya29.bwLu0ruxXdXe_RMOSYgfiCPORNMHLkf9rCDmV1rKtWu90TuF1d8B2SmdUlrjeOWNYThkgMM"
def secure(f):
@wraps(f)
def check_authorization(*args, **kwargs):
if request.headers.get("Authorization") == key:
return f()
@carcinocron
carcinocron / debugger pause beforeunload
Last active July 10, 2024 08:48
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@tdonohue
tdonohue / gist:7815940
Created December 5, 2013 23:22
My Apache mod_shib sample setup for DSpaceDirect (using mod_proxy to redirect to Tomcat via port 8009).
## WARNING THIS IS NOT YET IN PRODUCTION. IT SEEMS TO WORK IN TESTING THOUGH
<VirtualHost *:80>
ServerName test.dspacedirect.org
## Logging Settings ##
ErrorLog ${APACHE_LOG_DIR}/test.dspacedirect.org-error.log
CustomLog ${APACHE_LOG_DIR}/test.dspacedirect.org-access.log combined
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.