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 | |
register_activation_hook( __FILE__, 'setup_build_cron' ); | |
/** | |
* Setup a cron job to run daily. | |
* | |
* @return void | |
*/ | |
function setup_build_cron() { |
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
# Some docs imly source can be a directory, but it does not work actually. | |
# Below is a workaround | |
for p in a-source-folder/* | |
do | |
# Note that uppercase JPG suffix is not recognized so adding "jpg" to output file name. | |
darktable-cli --width 3000 --height 3000 --hq true $p $(dirname $p)-export/$(basename ${p%.JPG}.jpg); | |
done |
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 | |
# One Click LAMP Server Installer (Ubuntu/Debian) - Roskus | |
# @author Gustavo Novaro | |
# @version 3.3.1 | |
# @url https://gist.github.com/gnovaro/5295150774be1794028c15c83313c16e | |
# Run: sudo ./lamp_setup.sh | |
############################################### | |
#Servidor Web http | |
apt-get install -y nginx |
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/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |
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
# overwrite master with contents of seotweaks branch (seotweaks > master) | |
git checkout seotweaks # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge seotweaks # source name |
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 | |
//* Copy below this line */ | |
add_filter( 'gform_submit_button', 'form_submit_button', 10, 2 ); | |
function form_submit_button($button, $form) { | |
return '<input type="submit" class="button custom-class-here" id="gform_submit_button_' . $form['id'] . '" value="' . $form['button']['text'] . '">'; | |
} |
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
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
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
<pre><?php | |
// WordPress Multisite - Delete all revisions from all posts in a netword. | |
// Quick hack by @mrazzari, 2014. | |
// For context see this thread started by Kitchin at the forums: | |
// http://wordpress.org/support/topic/deleting-post-revisions-do-not-use-the-abc-join-code-you-see-everywhere | |
// HOWTO | |
// This snippet is meant to be called as a standalone script. | |
// Like http://example.com/tmp/multisite_delete_revisions.php |
NewerOlder