Skip to content

Instantly share code, notes, and snippets.

View abhi18av's full-sized avatar
:octocat:
(to-infinity-and-beyond!)

Abhinav Sharma abhi18av

:octocat:
(to-infinity-and-beyond!)
View GitHub Profile
#lang racket
(require net/http-client)
(require net/url)
(require json)
(require net/uri-codec)
(require racket/cmdline)
(define lg (make-logger 'currency-logger))
(current-logger lg)
@abhi18av
abhi18av / introrx.md
Created July 8, 2016 18:24 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@abhi18av
abhi18av / IndexedDB101.js
Created July 17, 2016 18:30 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@abhi18av
abhi18av / express-sample.cljs
Created August 12, 2016 13:03 — forked from jneira/express-sample.cljs
Clojurescript / node.js basic examples
(ns express_sample
(:require [cljs.nodejs :as node]))
(def express (node/require "express"))
(def app (. express (createServer)))
(defn -main [& args]
(doto app
(.use (. express (logger)))
(.get "/" (fn [req res]
@abhi18av
abhi18av / core.cljs
Created August 20, 2016 14:11 — forked from bhauman/core.cljs
Helpful patterns when developing with ClojureScript Figwheel and Express js
(ns todo-server.core
(:require
[cljs.nodejs :as nodejs]
[figwheel.client :as fw]))
(nodejs/enable-util-print!)
(defonce express (nodejs/require "express"))
(defonce serve-static (nodejs/require "serve-static"))
(defonce http (nodejs/require "http"))
@abhi18av
abhi18av / installing_pyaudio.md
Created January 16, 2017 04:55 — forked from jiaaro/installing_pyaudio.md
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
@abhi18av
abhi18av / truffle-material.md
Created November 13, 2017 13:46 — forked from smarr/truffle-material.md
Truffle: Languages and Material
@abhi18av
abhi18av / udemy-courses-download-using-cookies.md
Created September 28, 2018 13:12 — forked from barbietunnie/udemy-courses-download-using-cookies.md
Downloading Udemy videos with youtube-dl

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}
# this is a copay/paste combination of https://gist.github.com/nictuku/13afc808571e742d3b1aaa0310ee8a8d & https://gist.github.com/Rahul91/f051a391fac62ccebb581370b0ac644d
# so that we can install virtualbox via apt-get
for x in xenial xenial-security xenial-updates; do
egrep -qe "deb-src.* $x " /etc/apt/sources.list || echo "deb-src http://archive.ubuntu.com/ubuntu ${x} main universe" | sudo tee -a /etc/apt/sources.list
done
echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
# allow us to make a kernel