— PHP File Browser Scripts

These scripts offer some handy features for browsing files/folders on a webserver.

Source on GitHub.

more...

— clmpr

clmpr (clumper) is an open-source multi-user bookmarking engine, inspired by the original del.icio.us (RIP)

demo: clmpr.com source: http://github.com/quilime/clmpr

more...

— show hidden files (OSX Finder)

via Terminal

show hidden files:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

hide hidden files:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

more...

— Combine Files (Windows)

copy /b file1+ file2 output

eg

copy /b picture.jpg + archive.rar file.jpg

Open file.jpg with the default application, it will show the picture “picture.jpg”. Change the extension to “file.rar” or if you try to open “file.jpg” with an archiver you will get the contents of “archive.rar”.

more...

— create ssh keys

ssh-keygen -t rsa

# linux
ssh-copy-id [user@]host

# macos
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"
eval `ssh-agent`
ssh-add

more...

— resize multiple images

for k in $(ls *.JPG); do convert $k -resize 50% -quality 80 r_$k; done

more...

— URL Rewrite Double Slashes to Single

RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]

more...

— date for new filename

#!/bin/bash
# Shell script to create file named after the current date
# YYYY-MM-DD format

DATE=$(date +%Y"-"%m"-"%d)
echo -e "new file" > $DATE

more...

— Rename Multiple Files via Shell

ls | nl -nrz -w2 | while read a b; do mv "$b" filename.$a.png; done;

more...

— Sphere Intersect in Maya/MEL

Function to return location of intersect with poly mesh and spherical object moving in the positive direction on the Y axis.

more...