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 | |
# The goal of this script is to remove mp3's that have already been processed | |
temp_file='/tmp/music-dup.txt' | |
comm -12 <(swift list 'audio-in' | sed 's/.mp3//') <(swift list 'audio-out' | sed 's/.ogg//') > $temp_file | |
while read -r line; do | |
echo "removing item: $line.mp3" |
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 | |
# The goal of this script is to delete any files under 1mb (1048576 bytes) | |
while read -r file; do | |
length=$(swift stat audio-in "$file" | grep 'Content Length' | sed 's/Content Length: //') | |
#echo "Length is: $length" | |
if (( length < 1048576 )) ; then | |
swift delete audio-in "$file" | |
#echo "deleting $file" |
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
printf '\nTOKEN: %s\n' "$auth_token" | |
printf 'STORAGE: %s\n\n' "$storage_url" | |
store="need_encoding.log" | |
comm -23 <(swift list "audio-in" | sed 's/.mp3//') <(swift list "audio-out" | sed 's/.ogg//') > "$store" | |
counter=0 | |
total=$(wc -l <"$store") | |
while read -r line; do | |
((counter++)) |
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
Align Equals: Command + Control + a |
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
<html> | |
<head> | |
<title>Stripe Fun</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
<script type="text/javascript"> | |
Stripe.setPublishableKey('pk_2V6rBH5IilzAezJ8K9fcpOkYT7VJf'); | |
jQuery(function($) { | |
$('#payment-form').submit(function(event) { | |
var $form = $(this); |
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
// Save uploads for Products to a products subdir & Artists to an Artist dir | |
function reroute_upload_dir ( $pathdata ) { | |
$post_type = ( isset( $_POST['post_id'] ) ) ? get_post_type( $_POST['post_id'] ) : false; | |
if ( $post_type == 'product' ) { | |
$subdir = '/products'; | |
} elseif ( $post_type == 'artists' ) { | |
$subdir = '/artists'; | |
} elseif ( $post_type === 'post' ) { |
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
#Fix WP URLs | |
SET @oldurl = 'http://staging.windfarmstudios.net'; | |
SET @newurl = 'http://staging.wubdfarnstyduis.com'; | |
UPDATE wm_wp_options SET option_value = REPLACE(option_value, @oldurl, @newurl); | |
UPDATE wm_wp_posts SET guid = REPLACE (guid, @oldurl, @newurl); | |
UPDATE wm_wp_posts SET post_content = REPLACE (post_content, @oldurl, @newurl); |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# Redirect to https (this causes an infinite loop??) | |
#RewriteCond %{HTTPS} !^on$ | |
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
# Redirect old product urls |
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
<select name="rollbar_logging_level"> | |
<option value="1" <?php echo rollbar_get_error_level_match($current_val, 1); ?>>Fatal run-time errors (E_ERROR) only</option> | |
<option value="2" <?php echo rollbar_get_error_level_match($current_val, 2); ?>>Run-time warnings (E_WARNING) and above</option> | |
<option value="4" <?php echo rollbar_get_error_level_match($current_val, 4); ?>>Compile-time parse errors (E_PARSE) and above</option> | |
<option value="8" <?php echo rollbar_get_error_level_match($current_val, 8); ?>>Run-time notices (E_NOTICE) and above</option> | |
<option value="256" <?php echo rollbar_get_error_level_match($current_val, 256); ?>>User-generated error messages (E_USER_ERROR) and above</option> | |
<option value="512" <?php echo rollbar_get_error_level_match($current_val, 512); ?>>User-generated warning messages (E_USER_WARNING) and above</option> | |
<option value="1024" <?php echo rollbar_get_error_level_match($current_val, 1024); ?>>User-generated notice messa |
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
var page = new WebPage(), | |
testindex = 0, | |
loadInProgress = false, | |
fs = require('fs'); | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; | |
page.onLoadStarted = function() { |
OlderNewer