Skip to content

Instantly share code, notes, and snippets.

View dcode's full-sized avatar
💭
Hack the 🌎!

Derek Ditch dcode

💭
Hack the 🌎!
View GitHub Profile
@dcode
dcode / ytgif.sh
Last active December 8, 2021 18:47 — forked from dziban303/ytgif.sh
Convert a section of a YouTube video to an animated GIF
@dcode
dcode / generate_password_hash.sh
Last active May 18, 2020 16:02 — forked from vivianspencer/gist:1bf32ef808e7a8863d8e6c461d885278
generate SHA512 hashed and verified passwords on OSX with either python2 or python3. Should work on other platforms as well.
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):
@dcode
dcode / 0_reuse_code.js
Created November 4, 2015 13:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dcode
dcode / brocolor.sh
Last active August 29, 2015 14:06 — forked from jeffgeiger/brocolor.sh
#!/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 ""}'
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) = {