Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -u
set -e
response="$(gpg --export "$@" | curl --silent --show-error --upload-file - https://keys.openpgp.org)"
echo "${response}"
url="$(echo "${response}" | tail -n+2)"
@devurandom
devurandom / scanelf-needed-tree.sh
Last active September 25, 2019 20:10
Call scanelf --needed recursively to build a tree of library dependencies
#!/bin/bash
# This script avoids following security problem with `ldd` and thus `lddtree` by using `scanelf` instead:
# Be aware that in some circumstances (e.g., where the program specifies an ELF interpreter other than ld-linux.so), some
# versions of ldd may attempt to obtain the dependency information by attempting to directly execute the program (which may
# lead to the execution of whatever code is defined in the program's ELF interpreter, and perhaps to execution of the program
# itself). Thus, you should never employ ldd on an untrusted executable, since this may result in the execution of arbitrary
# code.
# Repeated appearances of a library are not fully resolved. The library is instead marked with `(*)` to indicate that its
@devurandom
devurandom / google-docs-audio-preview.js
Last active December 14, 2015 21:19
Google Docs - Audio Preview for MP3/WAV/OGG - WIP
// ==UserScript==
// @name Google Docs - Audio Preview for MP3/WAV/OGG
// @namespace http://leith.caldwell.net.nz/, www.lucianobello.com.ar (original: http://www.manekinekoninja.com)
// @version 1.2.7
// @author Leith Caldwell, Luciano Bello, edited by Tommy Smith, Dennis Schridde simplified it and removed flash usage
// @description Shows a player (google player for MP3 or audio tag for other formats) to preview audio files at Google Docs.
// @include http://docs.google.com/file/d/*/edit*
// @include https://docs.google.com/file/d/*/edit*
// ==/UserScript==
// the guts of this userscript