Skip to content

Instantly share code, notes, and snippets.

@carlosuema
carlosuema / apt-cache-ng.sh
Created July 28, 2018 00:34 — forked from nethunteros/apt-cache-ng.sh
apt-cacher-ng setup server
#!/bin/sh
# Install apt-cacher-ng
apt-get install -y apt-cacher-ng
# This will be a caching server on local network. Change IP to private or leave listening
echo "BindAddress: 0.0.0.0" >> /etc/apt-cacher-ng/acng.conf
echo "Port:3142" >> /etc/apt-cacher-ng/acng.conf
echo "PidFile: /var/run/apt-cacher-ng/pid" >> /etc/apt-cacher-ng/acng.conf
@carlosuema
carlosuema / git checkout-all-branches.sh
Created July 23, 2018 00:44
git checkout-all-branches
#!/bin/bash
#Whenever you clone a repo, you do not clone all of its branches by default.
#If you wish to do so, use the following script:
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done

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}
@carlosuema
carlosuema / 50-elantech-touchpad.conf
Created December 18, 2017 02:14 — forked from makiftasova/50-elantech-touchpad.conf
[libinput] /usr/share/X11/xorg.conf.d/50-elantech-touchpad.conf file for configuring ETPS/2 Elantech touchpads
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
MatchProduct "ETPS/2|Elantech"
Driver "libinput"
Option "Tapping" "on"
Option "TappingButtonMap" "lmr"
Option "DisableWhileTyping" "on"
Option "DisableWhileTyping" "on"
Option "NaturalScrolling" "on"