This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Convert all jpeg files in current dir to PNG in new folder Converted | |
sips -s format png *.jpeg –out Converted | |
#Convert all tiff files in current dir to jpeg in new folder Converted | |
sips -s format jpeg *.tiff –out Converted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo date('c'); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<?php | |
echo "This is a very simple php example."; | |
?> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<?php | |
echo "This is a very simple php example."; | |
?> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert *.png -set filename:base "%[basename]" -crop 2048x2048+0+0 -resize 640x640 -sharpen 0x1 res/"%[filename:base].png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in "$@"; do | |
echo "$f" | |
[[ "$f" != *.flac ]] && continue | |
album="$(metaflac --show-tag=album "$f" | sed 's/[^=]*=//')" | |
artist="$(metaflac --show-tag=artist "$f" | sed 's/[^=]*=//')" | |
date="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')" | |
title="$(metaflac --show-tag=title "$f" | sed 's/[^=]*=//')" | |
year="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = 'example.com'; | |
$password = 'pass'; | |
$username = 'username'; | |
try { | |
$result = checkFtp($host, $username, $password); | |
} catch(Exception $e) { | |
$result = $e->getMessage(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mina/rsync' | |
set :user, ENV['USER'] || 'username' | |
set :domain, ENV['DOMAIN'] || 'foobar.com' | |
set :deploy_to, ENV['DEPLOY_PATH'] || '/tmp/deploy' | |
set :branch, ENV['GIT_BRANCH'] || 'master' | |
set :repository, ENV['GIT_REPO'] || '.' | |
set :rsync_options, %w[ | |
--recursive --delete --delete-excluded | |
--exclude .git* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtoCHKm+G/ywvZvNkhXzUYXVLJGl6FYt+0dizFvcUNRsZmNZHjicBqOyAIRI4OSaACuMhaNJ9oakMLuZhdJxKETTZhRLmokRDgiTDBwItBLpM6NeLeFLpvj51vPllV6wqv6ybIb6sH3nuUkkeDrdkTOGB0uTXKKeU0ggzSWwUTEURQ6JdiQOgylmZ0WtK0PFjPykgDdikY/mGvKytgX2TizdMqbhF8YNuViRpV398QB+FFPkspm2jSpRAs7uEg53I14L1jde6NEJJMraIHSK5EnqFpJRRD+zc8VZ2+8jGtV6onQ9s+9kqPes7JyshkZwcndlT5539WJZ/Js1SHaH6Z fordnox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install wp-cli on server https://github.com/wp-cli/wp-cli | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
#install cache plugin to wordpress | |
curl -O https://raw.githubusercontent.com/bluehost/endurance-page-cache/master/endurance-page-cache.php | |
#activate plugin |