Skip to content

Instantly share code, notes, and snippets.

View mnsami's full-sized avatar

Mina Nabil Sami mnsami

View GitHub Profile
@mnsami
mnsami / download_egghead_videos.sh
Last active August 4, 2022 06:27
this script is to download egghead videos using youtube-dl
#!/bin/bash
usage() { echo "usage: --coursename [--coursename \"build-a-react-app-with-redux\"] --type [--type \"courses|lessons\"]" 1>&2; exit 1; }
OPTS=$(getopt -o c:t: --long coursename:,type: -n 'download_egghead_videos.sh' -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
eval set -- "$OPTS"

Keybase proof

I hereby claim:

  • I am mnsami on github.
  • I am minansami (https://keybase.io/minansami) on keybase.
  • I have a public key ASAEXSESoaKe99dq2Wqd9LNKRiyaCiWvmJkX0-O9d3hjVAo

To claim this, I am signing this object:

#!/bin/bash
apt-get remove $(dpkg -l|awk '/^ii linux-image-/{print $2}'|sed 's/linux-image-//'|awk -v v=`uname -r` 'v>$0'|sed 's/-generic//'|awk '{printf("linux-headers-%s\nlinux-headers-%s-generic\nlinux-image-%s-generic\n",$0,$0,$0)}')
@mnsami
mnsami / crawl-website.sh
Created January 4, 2016 16:25
wget to download website for offline viewing
#!/bin/sh
wget=/usr/bin/wget
if [ ! -x "$wget" ]; then
echo "ERROR: No wget." >&2
exit 1
fi
# This script is to download website to make it available for offline viewing.