Skip to content

Instantly share code, notes, and snippets.

View thebignet's full-sized avatar

Jean Detoeuf thebignet

View GitHub Profile
@thebignet
thebignet / .p10k_custom.zsh
Last active December 12, 2019 09:37
Oh My Zsh prompt
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL="zsh_wifi_signal"
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_BACKGROUND="white"
POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_FOREGROUND="black"
zsh_wifi_signal(){
local output=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I)
local airport=$(echo $output | grep 'AirPort' | awk -F': ' '{print $2}')
if [ "$airport" = "Off" ]; then
local color='%F{black}'

Keybase proof

I hereby claim:

  • I am thebignet on github.
  • I am thebignet (https://keybase.io/thebignet) on keybase.
  • I have a public key ASCpIyK2pjVCJlkKssiYHY2-SSk-KBVZt6VbA-GbMdNzDQo

To claim this, I am signing this object:

Copy and sort photos inside Year/Month/Day directory structure

exiftool -v -o $photosWithoutDate/%f%-c.%e -r '-FileName<CreateDate' -d $photosDir/%Y/%m/%d/%%f%%-c.%%e $sourceDir

Remove duplicates from $photosDir

fdupes -r --delete --immediate $photosDir

@thebignet
thebignet / PhotoImport.sh
Created February 22, 2017 20:31
Import photos automatically when drive inserted with Automator
VOLUMES="/Volumes"
OUTPUT="/Volumes/MyVolums/Photos" #Change output
PATH="$PATH:/usr/local/bin/"
OIFS="$IFS"
IFS=$'\n'
for disk in $(ls $VOLUMES); do
# Change disk regexp