Skip to content

Instantly share code, notes, and snippets.

@sproadn
sproadn / zip_dir.sh
Last active January 10, 2022 16:13
Zip each directory inisde a folder to separate zip file
#!/usr/bash
# Copy the script inside a folder who contains all folder you want to zip and run it
ls -d */ | cut -f1 -d'/' | while read folder_name;do zip -r "${folder_name}.zip" "${folder_name}"; done
@planetoftheweb
planetoftheweb / scrollingnav.js
Last active May 13, 2020 11:40
Smooth Scrolling Animation with an Offset...uses === and a predefined offset
//Use smooth scrolling when clicking on navigation
$('.navbar a[href*=\\#]:not([href=\\#])').click(function() {
if (location.pathname.replace(/^\//,'') ===
this.pathname.replace(/^\//,'') &&
location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top-topoffset+2
@seyDoggy
seyDoggy / zip all files.sh
Created October 31, 2012 13:37
Shell script to zip all files in a folder.
FILES=./*; for f in $FILES; do ditto -ck "$f" "$f.zip"; done
@LukeChannings
LukeChannings / check_for_film.sh
Created August 25, 2011 21:07
A script to check for films in a directory, and move them to another directory.
#!/bin/bash
##
# Check for Film
# - A script to check for films in a directory,
# - and move them to another directory.
#
##
CHECKDIR="/Volumes/Media/Downloads" # Directory to check for videos.