Skip to content

Instantly share code, notes, and snippets.

Zaydek zaydek

Block or report user

Report or block zaydek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mv.sh
echo 'cd $1; mv $2.txt $2.sh; bash $2.sh; mv $2.sh $2.txt' # " -> '
View imgs.js
document.getElementsByClassName('slide sqs-gallery-design-stacked-slide')[0].getElementsByTagName('img')[0].src // " -> '
View imgs.sh
imgs=(static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de7bc23571c2/574db7618259b5a818c67e19/1464711033056/IMG_7496Edited.jpg?format=1500w
static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de7bc23571c2/574db287d51cd48913eec356/1464710401609/IMG_7165Edited-2.jpg?format=1000w
static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de7bc23571c2/574db2a4d51cd48913eec49e/1465696247484/IMG_7167Edited-2.jpg?format=1000w
static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de7bc23571c2/575cbf28c6fc08a91276642d/1465696225607/IMG_8065.jpg?format=2500w
static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de7bc23571c2/574db1e2d51cd48913eebd1b/1464710401059/IMG_7162Edited.jpg?format=1000w
static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de7bc23571c2/574db1ced51cd48913eebc62/1464710400872/IMG_7157Edited-2.jpg?format=2500w
static1.squarespace.com/static/574cb9103c44d8bd12bead7e/574db100ab48de
View replace.applescript
on replace(s, f, r)
set AppleScript's text item delimiters to f
set _ to text items in s
set AppleScript's text item delimiters to r
text items of _ as string
end replace
replace("AppleScript", "Apple", "Java")
View rename.sh
osascript <<!
on rename(dir, ext, f, r)
repeat with s in list folder dir
if s contains "." & ext then
set text item delimiters to f
set _ to text items in s
set text item delimiters to r
text items of _ as string
do shell script "mv " & quoted form of (dir & s) & " " & quoted form of (dir & result)
end if
@zaydek
zaydek / curlt.sh
Last active Sep 10, 2016
stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl/#answer-22625150
View curlt.sh
function curlt { curl -o /dev/null -s -w '%{time_connect} + %{time_starttransfer} = %{time_total}\n' $1; } # " -> '
View .DS_Store.sh
osascript <<!
set vols to {¬
"/Volumes/SSD/", ¬
"/Volumes/SSD2/"}
on DS_Store(vols)
repeat with vol in vols
set {cont, dest} to {true, ""}
repeat while cont is true
try
View git-commit.sh
cd /Volumes/SSD2/; git clone https://github.com/zaydek/zaydek.github.io; mv zaydek.github.io zaydek; cd zaydek; git add -A; git commit --allow-empty-message -m ''; git push -u origin master
@zaydek
zaydek / frame.sh
Last active Sep 10, 2016
HandBrake + vidme + Imgur
View frame.sh
osascript -e 'tell app "QuickTime Player" to current time of document 1'
@zaydek
zaydek / dock.sh
Last active Sep 9, 2016
Hide; Apps; Size
View dock.sh
defaults write com.apple.dock autohide -bool true; defaults write com.apple.dock static-only -bool true; defaults write com.apple.dock size-immutable -bool true; killall Dock; killall Terminal
You can’t perform that action at this time.