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
songs1 = shuffle(allChannel1Songs) | |
songs2 = shuffle(allChannel2Songs) | |
songs3 = shuffle(allChannel3Songs) | |
channel_1_percent = channel1_percent/100 | |
channel_2_percent = channel2_percent/100 | |
channel_3_percent = channel3_percent/100 | |
songsRequired = 500 | |
playlist = [] |
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 | |
require_once 'lib/AmazonECS.class.php'; | |
$track = $_GET['track']; | |
$access_key_id = 'YOUR ACCESS KEY ID'; | |
$secret_access_key = 'YOUR SECRET ACCESS KEY'; | |
$affiliate_id = 'YOUR AFFILIATE ID'; | |
$client = new AmazonECS($access_key_id, $secret_access_key, 'com', $affiliate_id); | |
$response = $client->category('DigitalMusic')->responseGroup('Images')->search($track); |
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
[root@aspen ~]# convert powerpoint.pdf powerpoint%d.jpg | |
convert: no decode delegate for this image format `/tmp/magick-f6DSZRDI-00000001' @ error/constitute.c/ReadImage/544. | |
convert: Postscript delegate failed `powerpoint.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/679. | |
convert: no images defined `powerpoint%d.jpg' @ error/convert.c/ConvertImageCommand/3044. |
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
function parse_svn_dirty { | |
if [[ ($(svn st 2> /dev/null) == "") || ($(svn st 2> /dev/null | wc -l) == 1 && $(svn st 2> /dev/null | sed -e 's/\s*\(.\)\s*.*/\1/') == 'S') ]]; then | |
echo -e '\033[0;32m✔' | |
else | |
echo -e '\033[0;31m✗✗✗' | |
fi | |
} | |
function parse_svn_branch { | |
svn info 2> /dev/null | grep -i url | sed -e "s#url: $REPO\(.*\)#$(echo -e '\033[1;37m'). $(echo -e '\033[00m')svn at $(echo -e '\033[1;37m')\1$(parse_svn_dirty)#i" |
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
Vagrant::Config.run do |config| | |
config.vm.box = "upsync_vagrant_base" | |
config.vm.forward_port 80, 8080 | |
config.vm.share_folder("scripts", "/usr/local/bin/upsync", "/usr/local/bin/upsync") | |
config.vm.share_folder("publichtml", "/var/www/html/sandboxes/upsync", "./upsync", :owner => 'apache', :group => 'apache') | |
config.vm.share_folder("sapublichtml", "/var/www/html/sandboxes/sa2", "./sa2", :owner => 'apache', :group => 'apache') | |
config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/graph", "1"] | |
config.vm.network :hostonly, "33.33.33.10" | |
end |
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
mysql> delete from events_copy; delete from events_details_copy; | mysql> select * from events_details_copy where id = 1; | |
Query OK, 1644841 rows affected (31.62 sec) | +----+----------+-----------------+-------+ | |
| | id | event_id | detail | value | | |
| +----+----------+-----------------+-------+ | |
| | 1 | 1 | original_log_id | 99243 | | |
| +----+----------+-----------------+-------+ |
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 | |
$arr = array(1, 2, 3); | |
/** | |
* PHP Weirdness 1 | |
* 'continue' acts like 'break' inside of a switch statement when inside of a loop | |
* whereas 'continue' acts as expected inside an elseif block | |
*/ | |
foreach ($arr as $item) { | |
switch($item) { |
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
./configure \ | |
--program-prefix= \ | |
--prefix=/usr \ | |
--exec-prefix=/usr \ | |
--bindir=/usr/bin \ | |
--sbindir=/usr/sbin \ | |
--sysconfdir=/etc \ | |
--datadir=/usr/share \ | |
--includedir=/usr/include \ | |
--libdir=/usr/lib \ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.082352941176470587</real> | |
<key>Green Component</key> | |
<real>0.082352941176470587</real> |
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
curl "GET" -H "Icy-Metadata: 1" http://[streamurl] > ~/Desktop/[outputfile] | |
tail +16000c ~/Desktop/[outputfile] | head | sed "s/StreamTitle='\(.*\)';.*/\1~/" | perl -i.bak -pe 's/[^[:ascii:]]//g' | cut -d '~' -f 1 | head -n 1 |