Skip to content

Instantly share code, notes, and snippets.

@nonsleepr
nonsleepr / gist:afd37de1622d935995eb
Created July 2, 2014 06:14
DENSE_RANK for Teradata
-- Via http://forums.teradata.com/forum/database/dense-rank
SELECT
department_number,
/*** Syntax not implemented in Teradata ***/
DENSE_RANK() OVER (PARTITION BY department_number ORDER BY salary_amount),
last_name,
salary_amount
FROM employee;
@nonsleepr
nonsleepr / futurelearn_dl.sh
Last active October 25, 2015 09:09
FutureLearn Video downloader
#!/bin/bash
#
# Usage:
# > futurelearn_dl.sh [email protected] password course-name week-id
# Where *[email protected]* and *password* - your credentials
# ,*course-name* is the name from URL
# and *week-id* is the ID from the URL
#
# E.g. To download all videos from the page: https://www.futurelearn.com/courses/corpus-linguistics/todo/238
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nonsleepr
nonsleepr / gist:7908929
Created December 11, 2013 11:38
Script to download MIT's MAS.531 (http://mitglass.com/) course videos
#!/usr/bin/bash
# Requires:
# - xmlstarlet
# - gawk
# - wget
# - xargs
wget -qO - http://techtv.mit.edu/collections/compu-camera/videos.rss | \
xmlstarlet sel -t -m '//item' -v 'link' -o ',' -v 'enclosure/@url' -n | \