Skip to content

Instantly share code, notes, and snippets.

View dawud's full-sized avatar
😸
:(){ :|: & };:

David Sastre Medina dawud

😸
:(){ :|: & };:
View GitHub Profile
# Seen on https://unix.stackexchange.com/a/19048/39456
# https://pastebin.com/raw/EU23iAvL
## preserve tabulation, or you shall die!!111 ##
objdump -d -Mintel -j .text "$@" >111.tmp
(
echo -n 'cpuid: '; grep -cwF ' cpuid' 111.tmp
echo -n 'nop: '; grep -cwF ' nop' 111.tmp
#/usr/bin/env bash
url=$(curl -sL https://www.packer.io/downloads.html | \
awk '$0~/<a.*packer_.*_linux_amd64.zip/{gsub(/.*href="/,"");gsub(/".*/,"");print $0;exit}')
curl -sSL $url | funzip > /usr/local/bin/packer
exit 0
@dawud
dawud / get_latest_origin_release.sh
Last active December 4, 2018 16:08
Retrieve latest OpenShift Origin release from GitHub and extract to local bin
#!/usr/bin/bash
curl -sSL \
$(curl -s https://api.github.com/repos/openshift/origin/releases/latest | \
jq -r '.assets[] | select(.name | test("openshift-origin-client-tools.*linux")) | .browser_download_url') | \
tar -C /usr/local/bin/ --strip-components=1 -xz */oc
exit 0
@dawud
dawud / recipe.rb
Created November 23, 2015 22:18
Tarsnap fpm-cookery recipe
class TarSnap < FPM::Cookery::Recipe
source 'https://www.tarsnap.com/download/tarsnap-autoconf-1.0.36.1.tgz'
homepage 'https://www.tarsnap.com/'
# Verify the signed SHA256 hash file from
# https://www.tarsnap.com/download/tarsnap-sigs-1.0.36.1.asc
sha256 'a2909e01e2f983179d63ef2094c42102c92c716032864e66ef25ae341ea28690'
name 'tarsnap'
version '1.0.36.1'
license 'Tarsnap License'
section 'tools'
@dawud
dawud / gist:f0bdaae3430ddf9b31a9
Last active November 15, 2015 14:38
Gitblit bugtraq integration for osTicket
https://github.com/gitblit/gitblit
https://github.com/osTicket/osTicket-1.8
https://github.com/mstrap/bugtraq
See also https://github.com/gitblit/gitblit/blob/master/.gitbugtraq
[bugtraq "osticket"]
url = "https://osticket.company.com/scp/tickets.php?id=%BUGID%#"
loglinkregex = "\\[OSTicket\\]\\s*\\d+"
logregex = "\\d+"