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 / translation_process.md
Created Dec 3, 2014
Bitcoin Revised doc/translation_process.md
View translation_process.md

Translations

Summary

  • The Bitcoin Core GUI can be easily translated into other languages
  • We use Transifex to manage all translations (Bitcoin Project)
  • The languages manifest file can be found at src/qt/bitcoin.qrc
  • Translation source files are located in src/qt/locale/
  • .ts files are generated translation source files
  • .qm files are compiled binary translation files
@blakejakopovic
blakejakopovic / firmata-test-server.ino
Created Sep 23, 2014
Spark Core Sketch for testing Firmata over TCP server
View firmata-test-server.ino
#include "firmata-spark/firmata-spark.h"
TCPServer server = TCPServer(5678);
TCPClient client;
bool new_client = true;
void setup()
{
// start listening for clients
@blakejakopovic
blakejakopovic / message-parse.cljs
Created Sep 11, 2014
Clojurescript node.js firmata message parser (incomplete)
View message-parse.cljs
(defn parse-message
"Parses incoming data and emits valid messages"
[]
(let [data (js/Buffer 0)]
(fn [emitter buffer]
;; Append new data to buffer
(set! data (.concat js/Buffer [data buffer]))
;; Remove incomplete messages (ie. not control charactors)
@blakejakopovic
blakejakopovic / SparkFloatToByteTest.ino
Created Aug 27, 2014
Spark Core Float to Byte Test
View SparkFloatToByteTest.ino
float a = 6.7;
float b = 14.6;
float c = 26.3;
byte* method1(float num)
{
byte buff[sizeof(float)];
memcpy(buff, &num, sizeof(float));
return buff;
@blakejakopovic
blakejakopovic / adapter-example.cljs
Created Aug 14, 2014
Clojurescript clj-firmata WIP adapter
View adapter-example.cljs
(ns testdrive.example
(:require [firmata.core :refer [open-board event-channel]]
[firmata.stream :refer [FirmataStream]]
[cljs.nodejs :as nodejs])
(def net (nodejs/require "net"))
(defrecord SocketStream [host port]
FirmataStream
View firmata-spark-example.ino
#include "firmata-spark/firmata-spark.h"
TCPServer server = TCPServer(5678);
TCPClient client;
bool new_client = true;
void setup()
{
// start listening for clients
@blakejakopovic
blakejakopovic / cljs-nw-serial.cljs
Created Aug 3, 2014
FirmataSerial Nodejs Clojurescript clj-firmata serial adapter
View cljs-nw-serial.cljs
(ns cljs-nw-serial.core
(:require [cljs.nodejs :as nodejs]))
(enable-console-print!)
(def SerialPort (.-SerialPort (nodejs/require "serialport")))
(defprotocol FirmataStream
(open! [this] "opens the stream")
@blakejakopovic
blakejakopovic / sysex.clj
Created Jul 23, 2014
Extending clj-firmata in TestDrive
View sysex.clj
(ns testdrive.sysex
(:require [firmata.core :refer [read-sysex-event consume-sysex read-two-byte-data]]))
(def ^{:private true} SYSEX_TYPE_EVENT 0x01 )
(def ^{:private true} SYSEX_TYPE_REGISTER 0x02 )
(def ^{:private true} KIND_ACCELEROMETER 0x01 ) ;;;
(def ^{:private true} KIND_MAGNETIC_FIELD 0x02 ) ;;;
(def ^{:private true} KIND_ORIENTATION 0x03 ) ;
(def ^{:private true} KIND_GYROSCOPE 0x04 ) ;;;
@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