View https-self-signed
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 -v | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -subj '/CN=localhost' -nodes | |
npx http-server -S . |
View totp.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 | |
if [ -z $1 ]; then | |
echo | |
echo "Usage:" | |
echo " ./totp.sh service" | |
echo | |
echo "Configuration: $HOME/.totpkeys.gpg" | |
echo "File encoded with gpg" | |
echo "Format: service=key" | |
exit |
View unicorn.py
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
from netlib.http import decoded | |
import pprint | |
def response(context, flow): | |
if flow.response.headers.get('Content-Type','').startswith("text/html"): | |
with decoded(flow.response): | |
flow.response.content = flow.response.content.replace( | |
"</body>", | |
"<script>var cornify_count=0,cornify_add=function(){cornify_count+=1;var e=\"http://www.cornify.com/\",t=document.createElement(\"div\");t.style.position=\"fixed\";var n=\"px\",o=.75*Math.random(),r=768,i=1024,c=0,a=document.documentElement;\"number\"==typeof window.innerHeight?(r=window.innerHeight,i=window.innerWidth):a&&a.clientHeight?(r=a.clientHeight,i=a.clientWidth):(n=\"%\",c=Math.round(100*c)+\"%\"),t.onclick=cornify_add,t.style.zIndex=10,t.style.outline=0,15==cornify_count?(t.style.top=Math.max(0,Math.round((r-530)/2))+\"px\",t.style.left=Math.round((i-530)/2)+\"px\",t.style.zIndex=1e3):(\"px\"==n?t.style.top=Math.round(r*o)+n:t.style.top=c,t.style.left=Math.round(90*Math.random())+\"%\");var l=document.createElement(\"img\"),d=new |
View pi-gpio-switch
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
/* | |
Utility to switch Raspberry-Pi GPIO pin functions | |
Tim Giles 01/04/2013 | |
Usage: | |
$ gpio_alt -p PIN_NUMBER -f ALT_NUMBER | |
Based on RPi code from Dom and Gert, 15-Feb-2013, <http://elinux.org/RPi_Low-level_peripherals#C_2> | |
and Gnu getopt() example <http://www.gnu.org/software/libc/manual/html_node/Example-of-Getopt.html#Example-of-Getopt> | |
*/ |
View bookmarklet-sms-free
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
javascript:var u='USERNAME', p='PASSWORD', m = prompt('Message ?'); if (m) {var r = new XMLHttpRequest();r.open('GET', 'https://smsapi.free-mobile.fr/sendmsg?user='+u+'&pass='+p+'&msg='+encodeURIComponent(m), true);r.send(null);} |
View rsstodolist.coffee
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
# Description: | |
# Allows you to send or fetch links to/from the rsstodolist service (https://rsstodolist.appspot.com) | |
# | |
# Dependencies: | |
# jsdom | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
View parallelized-casperjs
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
ls tests/suites/ | /usr/local/bin/parallel "casperjs test tests/suites/{}" |
View future
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
var future = function(expectedCalls, action) { | |
var counter = 0; | |
return function() { | |
counter++; | |
if (counter === expectedCalls) action(); | |
} | |
} | |
var products = [ {id:1}, {id:2}, {id:3}, {id:4}, {id:5} ]; |
View LICENSE.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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |