Skip to content

Instantly share code, notes, and snippets.

View crankycoder's full-sized avatar

Victor Ng crankycoder

View GitHub Profile
@nevillepark
nevillepark / README.md
Last active April 2, 2024 14:51
CBC radio stream URLs

CBC Radio Stream URLs

Using these URLs, you can listen to CBC radio streams with applications like VLC or Transistor. The files are M3U playlists, so you can use them as-is, edit them to suit your tastes, or use individual URLs.

This playlist contains the .m3u8 URLs from the CBC Listen website, which uses the HLS (HTTP Live Streaming) protocol. The audio stream is broken up into multiple tiny files, which are then fed into the .m3u8 playlist file that delivers them to your computer in the right order. This should work with modern media players.

This legacy playlist uses good old-fashioned MP3 streams found on PublicRadioFan.com. It will work with older programs like Winamp that don't support HLS. I don't know how lo

@arminwasicek
arminwasicek / smartplug.py
Last active March 15, 2020 23:07 — forked from wendlers/smartplug.py
Simple library/command-line-utility to control a EDIMAX Smart Plug Switch (SP-1101W) from Python
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Stefan Wendler
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@L422Y
L422Y / osx_automount_nfs.md
Last active March 22, 2024 13:44
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Download the compiled elasticsearch rather than the source.
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@quiver
quiver / README.md
Last active April 3, 2024 15:47
Who says PostgreSQL can't Pub/Sub like Redis?

Pub/Sub pattern with PostgreSQL's LISTEN/NOTIFY command

This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.

Publish

publish message to foo channel from user nickname.

$ python pub.py foo nickname
PUBLISH to channel #foo
@oyiptong
oyiptong / graphite.md
Created April 20, 2012 18:14 — forked from caged/graphite.md
Installing Graphite on OS X Lion using brew, pythonbrew and virtualenv

This is a general overview (from memory) of the steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion. I think the steps are in order but YMMV. Please fork and fix if you find an error.

Install Python 2.7.2

curl -kL http://xrl.us/pythonbrewinstall | bash
echo '[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc' >> ~/.bashrc
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
pythonbrew install 2.7.2
pythonbrew use 2.7.2
pythonbrew venv create graphite