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
pip install passlib | |
cat << EOF | python | |
from __future__ import print_function; | |
from passlib.hash import sha512_crypt; | |
import getpass; | |
import sys, os; | |
hash = sha512_crypt.hash(getpass.getpass()) | |
if sha512_crypt.verify(getpass.getpass("Verify password:"), hash): |
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
#!/bin/bash | |
cat $1 | sed 's/#fields\t\|#types\t//g' | grep -v "^#" | awk 'BEGIN {FS="\t"; OFS=FS};{for(i=1;i<=NF;i++) printf("\x1b[%sm%s\x1b[0m%s",(i%7)+31,$i,OFS); print ""}' |
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
object Download extends Controller { | |
import org.apache.commons.logging.Log | |
import org.apache.hadoop.conf.Configuration | |
import org.apache.hadoop.fs._ | |
import java.io.InputStream | |
import java.net.URI | |
import java.net.URLDecoder | |
def download(filename: String) = { |