Skip to content

Instantly share code, notes, and snippets.

View Link-'s full-sized avatar
:octocat:

Bassem Dghaidi Link-

:octocat:
View GitHub Profile
@Link-
Link- / wget-all
Created March 21, 2015 20:28
wget magic
# Download all files from a given online directory
# into the a local directory without mirroring the
# folder structure
wget -A <accepted only extensions> -r -l <levels of depth> -nd http://domain.com/folder/
wget -R <all except X> -r -l <levels of depth> -n http://domain.com/folder

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Link-
Link- / inputrc
Created March 1, 2015 07:32
Up/Down history search
# Create ~/.inputrc file and paste
# this in it
"\e[A": history-search-backward
"\e[B": history-search-forward
# Example:
# cd+UP : will return all previous cd commands
# and paramters
@Link-
Link- / Useful Unix
Last active November 24, 2017 15:56
Unix : Search & Rescue commands
-- Find
egrep -Rl <regular expression> <file or files>
-- Find and Replace
grep -l '' ./* | xargs sed -i "" 's/IP4445A/IP445A/'
-- Find and Replace (no RegEx)
-- Add IMO number
grep -l '' ./* | xargs sed -i "" 's|MSC:172:20+++:146::VITNAME|MSC:172:20+++9299551:146::VITNAME|g'
-- Change VVN
@Link-
Link- / gist:5043704
Created February 27, 2013 00:25
# Linux # Will tarify all folders/files in a directory and create # a separate tar file for each
#!/bin/bash
# Will tarify all folders/files in a directory and create
# a separate tar file for each
for f in */; do tar -cvf "${f%/}.tar" "$f"; done