Skip to content

Instantly share code, notes, and snippets.

@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active April 15, 2024 13:47 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_904/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_904/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_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Relax
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_relax/bbc_radio_one_relax.isml/bbc_radio_one_relax-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
if !isdirectory(expand("~/.vim/bundle/Vundle.vim/.git"))
silent !git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
silent !vim +PluginInstall +qall
endif
@kris-ellery
kris-ellery / JS-error-tracking-with-GA.js
Last active November 18, 2021 19:00
Track JavaScript errors using Universal Analytics from Google.
/**
* Track JS error details in Universal Analytics
*/
function trackJavaScriptError(e) {
var errMsg = e.message;
var errSrc = e.filename + ': ' + e.lineno;
ga('send', 'event', 'JavaScript Error', errMsg, errSrc, { 'nonInteraction': 1 });
}
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@stereoscott
stereoscott / active_admin.rb
Last active March 15, 2020 10:47
Stream CSV exports in ActiveAdmin in Rails 4
# if you want to monkey patch every controller, put this in initializers/active_admin.rb
ActiveAdmin::ResourceController.class_eval do
include ActiveAdmin::CSVStream
end
@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
class Foo
def bar(arg)
arg.call
end
end
class X
def call
"Normal class"
end
@jsteiner
jsteiner / projections.json
Last active June 14, 2016 17:38
Example Rails.vim projections for a Backbone.js project.
{
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.coffee",
"template": "class @AppName.Models.%S extends Backbone.Model"
},
"app/assets/javascripts/collections/*.coffee": {
"command": "jcollection",
@roxlu
roxlu / install_arch_linux.org
Created March 5, 2013 22:42
Install arch-linux - work in progress gui

Installing ARCH linux

Preparation:

  • Get an empty USB disk
  • Create 2 partitions:
    • ARCH - filesystem FAT
    • FAT - filesystem FAT
  • Downlaod Arch linux from: www.archlinux.org/download and put on your USB ARCH partition
  • Make sure you have an Ubuntu install somewhere (VMware would work)

Fix the iso to be usable for UEFI:

@jordelver
jordelver / gist:5063615
Created March 1, 2013 09:51
Make the Sign Column show up all the time
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Add a 'dummy' sign to the Sign Column to make it show up all the time
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! ShowSignColumn()
sign define dummy
execute 'sign place 9999 line=1 name=dummy buffer=' . bufnr('')
endfunc
"" Make the Sign Column always show up
au BufRead,BufNewFile * call ShowSignColumn()