Skip to content

Instantly share code, notes, and snippets.

@danbt79
danbt79 / BBC-Radio-HLS.m3u
Created November 28, 2024 14:00 — forked from bpsib/BBC-Radio-HLS.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_900/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_900/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_900/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1 Anthems (UK Only)
http://as-hls-uk-live.akamaized.net/pool_900/live/uk/bbc_radio_one_anthems/bbc_radio_one_anthems.isml/bbc_radio_one_anthems-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
import logging
import zerigodns
import boto
from boto.route53.record import ResourceRecordSets
from boto.s3.website import RedirectLocation
# There is no API for these so we have to embed and lookup
# https://forums.aws.amazon.com/thread.jspa?threadID=116724
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
@danbt79
danbt79 / deploy.rb
Created March 11, 2013 18:41 — forked from mhayes/deploy.rb
require 'capistrano/ext/multistage'
require "bundler/capistrano"
#use local key for authentication
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
set :application, 'awesome'
set :repository, "[email protected]:zurb/awesome.git"
# ===================================
# Capistrano Multistage Configuration
# ===================================
# 1) Let your 'config/deploy.rb' know that you're using multistage
# ===================================
# config/deploy.rb
# ===================================
set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
@danbt79
danbt79 / brew-install-gs-02.make
Created October 3, 2012 01:28
'brew install gs' fails on 'make install'
$ brew doctor
Your system is raring to brew.
$ cat ~/Library/Logs/Homebrew/ghostscript/02.make
cc -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -DUSE_LIBICONV_GNU -I/usr/local/Cellar/libtiff/4.0.2/include -lz -I./base -o ./obj/aux/genconf ./base/genconf.c
brew: superenv removed: -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement
cc -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -DUS
# Musings on <select> inputs:
# (aka: how Rails is doing it right.)
# This is what Rails looks like in the books:
f.date_select :end_date
# This is what Rails looks like in production:
f.date_select :end_date, {:include_blank => false, :start_year => Time.zone.now.year, :end_year => (Time.zone.now + 2.years).year, :order => [:month, :day, :year], :prompt => {:month => t(:select_month), :day => t(:select_day), :year => t(:select_year)} }, {:class => 'datetime_picker'}
# The second may be long, but it's still just a single line.