commit 1df6316ec7d07da6e6e885e13b74560fe8016acf Author: yorch Date: Mon Dec 8 10:12:55 2014 -0800 Brought over my workplace scripts diff --git a/applescript/bkp/modifiers_restore.scpt b/applescript/bkp/modifiers_restore.scpt new file mode 100644 index 0000000..18a5160 Binary files /dev/null and b/applescript/bkp/modifiers_restore.scpt differ diff --git a/applescript/bkp/modifiers_switch.scpt b/applescript/bkp/modifiers_switch.scpt new file mode 100644 index 0000000..9131637 Binary files /dev/null and b/applescript/bkp/modifiers_switch.scpt differ diff --git a/applescript/get_current_path.scpt b/applescript/get_current_path.scpt new file mode 100644 index 0000000..d5da61b Binary files /dev/null and b/applescript/get_current_path.scpt differ diff --git a/applescript/modifiers_restore.scpt b/applescript/modifiers_restore.scpt new file mode 100644 index 0000000..1c93530 Binary files /dev/null and b/applescript/modifiers_restore.scpt differ diff --git a/applescript/modifiers_switch.scpt b/applescript/modifiers_switch.scpt new file mode 100644 index 0000000..6951ccd Binary files /dev/null and b/applescript/modifiers_switch.scpt differ diff --git a/applescript/switch_when_blender_is_on.scpt b/applescript/switch_when_blender_is_on.scpt new file mode 100644 index 0000000..1229917 Binary files /dev/null and b/applescript/switch_when_blender_is_on.scpt differ diff --git a/bash/make_for_web.sh b/bash/make_for_web.sh new file mode 100755 index 0000000..71026d5 --- /dev/null +++ b/bash/make_for_web.sh @@ -0,0 +1,9 @@ +for i; + do + ffmpeg -i "$i" \ + -c:v libvpx -b:v 5M -minrate 1M -maxrate 10M -g 30 -crf 4 -pix_fmt yuv420p "${i%.*}.webm" \ + -c:v libx264 -b:v 5M -minrate 1M -maxrate 10M -g 30 -profile:v main -pix_fmt yuv420p -strict -2 "${i%.*}.mp4" \ + -c:v libtheora -b:v 5M -minrate 1M -maxrate 10M -g 30 -pix_fmt yuv420p "${i%.*}.ogv"; + done + + diff --git a/bash/make_review.sh b/bash/make_review.sh new file mode 100755 index 0000000..be34544 --- /dev/null +++ b/bash/make_review.sh @@ -0,0 +1,4 @@ +for i; + do ffmpeg -i "$i" -s 960x540 -c:v libx264 -profile:v main -pix_fmt yuv420p -strict -2 "${i%.*}_h264.mov" ; +done; + diff --git a/bash/make_todays_folder.sh b/bash/make_todays_folder.sh new file mode 100755 index 0000000..983e5c9 --- /dev/null +++ b/bash/make_todays_folder.sh @@ -0,0 +1,2 @@ +make_todays_folder.py +exit diff --git a/bash/mount_whitehorse.command b/bash/mount_whitehorse.command new file mode 100755 index 0000000..6710827 --- /dev/null +++ b/bash/mount_whitehorse.command @@ -0,0 +1,21 @@ +stty -echo +echo Waiting for silly MAC lag... +for i in {1..3}; +do + echo ...$i + sleep 1 +done +echo mounting whitehorse +mkdir /Volumes/whitehorse +mount -t smbfs //mak:ale2312x@makineisilon/whitehorse /Volumes/whitehorse +echo mounting pegasus +mkdir /Volumes/pegasus +mount -t smbfs //jorge:Ladilla2@mak-nas/pegasus /Volumes/pegasus +echo done. +sleep 1 +open -a trolCommander +open -a adium + +stty echo + +exit diff --git a/python/bbbd.py b/python/bbbd.py new file mode 100644 index 0000000..d41e790 --- /dev/null +++ b/python/bbbd.py @@ -0,0 +1,20 @@ +import urllib.request,re,getopt + +def get_links(**options): + url="http://builder.blender.org/download" + ptn='(?<=href\=\")[^\"]*' + source=urllib.request.urlopen(url).read().decode("utf-8") + links=(re.findall(ptn,source)) + masked_links = [] + for l in range(0,len(links)): + if links[l].find("blender") != -1: + masked_links.append(links[l]) + try: + opt = options.get() + except TypeError: + opt = "none" + return masked_links +links = get_links() + +for l in links: + print(l) diff --git a/python/make_todays_folder.py b/python/make_todays_folder.py new file mode 100755 index 0000000..64f2169 --- /dev/null +++ b/python/make_todays_folder.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +# Creates a timestamp for today, and checks if a folder of that description exists, if id doesn't it creates it. +import os, datetime +def get_timestamp(): + today = datetime.date.today() + curr_year = str(today.year)[2:4] + curr_month = str(today.month) + curr_day = str(today.day) + if len(curr_month) < 2 : + curr_month = '0' + curr_month + if len(curr_day) < 2 : + curr_day = '0' + curr_day + + time_stamp = curr_month + curr_day + curr_year + return time_stamp + + +tentative_path = os.getcwd() + os.sep + get_timestamp() + + +if not os.path.exists(tentative_path): + os.mkdir(tentative_path) + print('folder_created at : '+ tentative_path) +else: + print('folder already exists')