Skip to content

Instantly share code, notes, and snippets.

Avatar

Blake Jakopovic blakejakopovic

View GitHub Profile
View udemy-courses-download-using-cookies.md

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@blakejakopovic
blakejakopovic / SparkGraph.playground
Created Jul 2, 2014
Simple spark graph NSView example written in Swift. Open with Xcode for live preview and coding.
View SparkGraph.playground
import Cocoa
import XCPlayground
@IBDesignable
class SparkGraph: NSView {
// Background Colour
@IBInspectable var backgroundColor:NSColor?
// Border
View gist:7115764

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
View appcrush.rb
#!/usr/bin/ruby -rubygems
#
# Point appcrush at an .ipa file from the iTunes AppStore and it
# - expands the zip file
# - finds all the images
# - runs pngcrush with the revert-iphone-optimizations option on each image
#
# Requirements Xcode with iOS SDK 3.2 or higher
#
# Usage: appcrush '/Users/boctor/Music/iTunes/Mobile Applications/iBooks.ipa'
@blakejakopovic
blakejakopovic / Lircmap.xml
Created Apr 14, 2013
Lircmap.xml for DVICO_MCE2 and XBMC
View Lircmap.xml
<lircmap>
<remote device="DVICO_MCE2">
<pause>playpause</pause>
<stop>stop</stop>
<forward>ff</forward>
<reverse>rew</reverse>
<left>left</left>
<right>right</right>
<up>up</up>
<down>down</down>
View Gemfile
source 'https://rubygems.org'
# The latest version of Ruby
ruby '1.9.3'
# The lastest version of Rails
gem 'rails', '3.2.10'
# Postgres
gem 'pg'
@blakejakopovic
blakejakopovic / tmux_iterm2.rb
Created Apr 15, 2012 — forked from jhuckabee/tmux_iterm2.rb
Brew script for 'Tmux for iTerm2'
View tmux_iterm2.rb
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120203.tar.gz'
md5 '59305a26bdd0245054fe719e6b2a960e'
homepage 'http://code.google.com/p/iterm2/downloads/detail?name=tmux-for-iTerm2-20120203.tar.gz&can=2&q='
depends_on 'libevent'
def install
@blakejakopovic
blakejakopovic / Guardfile
Created Apr 6, 2012 — forked from drnic/Guardfile
An example Guardfile with the works for a Rails app
View Guardfile
guard 'rspec', :version => 2 do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
@blakejakopovic
blakejakopovic / hack.sh
Created Apr 1, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@blakejakopovic
blakejakopovic / twitter_favourite_reader.rb
Created Mar 24, 2012
Open twitter favourite tweets links in new tabs (Mac OS X only)
View twitter_favourite_reader.rb
#!/usr/bin/env ruby
##############################
# WARNING
# Will unfavourite your tweets
#
##############################
require 'twitter'
# require 'redis'