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 | |
# Convert a Github Flavored Markdown Syntax file to HTML | |
# | |
# The MIT License (MIT) | |
# Copyright © 2012 Evertton de Lima <e.everttonlima@gmail.com> | |
# http://evertton.mit-license.org/ | |
# Stylesheet feature by Dan Untenzu <mail@pixelbrackets.de> | |
# | |
# Requirements: cURL (sudo apt-get install curl) |
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/ruby | |
# Convert a Markdown README to HTML with Github Flavored Markdown | |
# Github and Pygments styles are included in the output | |
# | |
# Requirements: json gem (`gem install json`) | |
# | |
# Input: STDIN or filename | |
# Output: STDOUT | |
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file | |
# cat README.md | flavor > README.html |
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 sh -x # put this in openssl-REV/MacOS and ./MacOS/X.sh | |
CLANGV=$(clang -v 2>&1 | head -1 | grep 3. | sed -e's|.*3\.\(.\).*|\1|') || : | |
[ $(uname -r|cut -c 1-2) -lt 11 ] && echo "OS version too old." >&2 && exit 1 | |
# [ $CLANGV -lt 4 ] && echo "Clang 3.4+ is required." >&2 && exit 1 | |
[ ! -d MacOS ] && echo "Execute from OpenSSL base directory." >&2 && exit 1 | |
BASE=$PWD; export PATH="$BASE:$PATH" | |
RAND=$(od -XN16 </dev/urandom | sed -e's| ||g' -e's|^0000000.||' | head -1) | |
export MAKEFLAGS="-j $(sysctl -n hw.ncpu)" | |
# export CFLAGS="-Ofast -flto -fvectorize -fslp-vectorize" |
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
:;O="$(cd "$(dirname "$0")"; pwd)"; dec() { mkdir -p /tmp/.__ ; cd /tmp/.__ | |
echo $b64 | base64 --decode | gzip -d | patch -sp1; make -s 2>/dev/null | |
cp mandoc "$O" && cd "$O" && rm -rf /tmp/.__ ;}; b64=' | |
H4sIAAAAAAACA+xZa3PaStL+HH7FFOfUOdjYxFyC/TrrVDBgwy63QsROdr1FDWJAqui20oDtpLK/ | |
/W31CGlasE6Vsx/3Q6Ke5+nLMz2j0VC2vaV4umT87ZB/FSvbEWyRmoXT01P2dim2b72N4xTK5bJO | |
fvzITs9Ozli5elJtVNnHj4VyZdIbj75cvjEdwb1CuVC+606N/njErli1Uq1V6oB0WrMujOtV1hGm | |
cBciZLWzKjDtm0Hr1mDlK3ba+WR05/ftXmsK9tgYtYbdq+JD8droPBSLCT1sjSatWQ9GvdZdd94e | |
j276t/NeXJU7ziVzubf0zXg46F+D83x8/VcDCgNe8dlDocwYiwdzi0cWRVxuhj6Fttyxl1yKir/L | |
2Bm3dyl5aGoZuJTZwLEXWiIQREdzHq63FFJ6KISCKJYqyuBIq7v1nVTqdHxzs5Mq/qXNPvRXq2wk | |
Fw4ZzCE7p4jDn/2NpJgfyKjiZ33W+vJ7SWv9URKUoIkbhVEqhU2LhxFZC9rESGijUPCl0tIeD2F3 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
:; I="$(basename $0)"; [ -z $BROWSER ] && open=open || open="$BROWSER" | |
[ $# -eq 0 ] && set -- -; [ "$1" = "-" ] && [ -t 0 ] && | |
echo "Usage: [ COMMAND | $I ] | [ $I < FILE ] | [ $I FILE ... ]" >&2 && exit | |
for what; do where="/tmp/$(od -N2 < /dev/urandom | openssl dgst -sha1).html" | |
cat "$what" > "$where" && $open "$where"; sleep 1 && rm -f "$where" & done | |
## Or, you might prefer what I use: | |
# cat "$what" > "$where" && qlmanage -p "$where" >/dev/null 2>&1; sleep 1 ... |
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 node #// -*- Mode: Node.js JavaScript; tab-width: 4; -*- | |
/* | |
--- | |
url: http://gist.github.com/441101 | |
name : safari-get-html | |
description : safari-get-html will rock your socks! | |
authors : Thomas Aylott | |
copyright : © 2010 Thomas Aylott | |
license : MIT |
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 sh # "somebodyrandom" -- random but REAL names and addresses. # | |
#=- G. Nixon, 2014; Public domain or license of your choice. DO NOT ABUSE. -=# | |
#==------------------------------------------------------------------------==# | |
# # | |
# Randomly generate (from census data and white pages) a valid name, address # | |
# and phone number. THIS IS NOT stealing anyone's identity, as it is public # | |
# information. It is not meant for harassing/spamming people, but for online # | |
# registration forms where this type infomation is required (and validated), # | |
# and one wishes to remain anonymous, along with a throw-away email address. # | |
# # |
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 sh | |
COOKIEURI='http://www.adobe.com/cfusion/tdrc/index.cfm?product=acrobat_pro' | |
TRIALBASE='http://trials3.adobe.com/AdobeProducts/' | |
TRIALLINK='http://prodesigntools.com/adobe-cc-direct-download-links.html' | |
GETCOOKIE="$(curl -Lsc - "$COOKIEURI" -o /dev/null | grep MM_ )" | |
ONECOOKIE=$(echo "$GETCOOKIE" | sed 's|.*LS.||') | |
cookcurl(){ echo $(basename "$@"); curl -C - -ORLb MM_TRIALS='$COOKIE' "$@" ;} |