Skip to content

Instantly share code, notes, and snippets.

View syz3r's full-sized avatar

Sushil Singh syz3r

View GitHub Profile
@syz3r
syz3r / Docker install ubuntu 16.04
Last active November 18, 2016 09:05
Commands to Install docker on ubuntu
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
apt-cache policy docker-engine
sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get update
sudo apt-get install docker-engine
@syz3r
syz3r / slug.js
Created July 17, 2017 18:33 — forked from bentruyman/slug.js
JavaScript Slug Generator
// Generates a URL-friendly "slug" from a provided string.
// For example: "This Is Great!!!" transforms into "this-is-great"
function generateSlug (value) {
// 1) convert to lowercase
// 2) remove dashes and pluses
// 3) replace spaces with dashes
// 4) remove everything but alphanumeric characters and dashes
return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
};
@syz3r
syz3r / udemy-courses-download-using-cookies.md
Created November 15, 2017 13:51 — forked from barbietunnie/udemy-courses-download-using-cookies.md
Downloading Udemy videos with youtube-dl

Download 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}

@syz3r
syz3r / extract.py
Created October 12, 2018 12:18
iphone-backup-extractor python 3 script
# Original project https://github.com/alexisrozhkov/extract_media_from_backup
import os
import shutil
import sqlite3
import argparse
# http://stackoverflow.com/questions/12517451/python-automatically-creating-directories-with-file-output
def copy_file_create_subdirs(src_file, dst_file):