Skip to content

Instantly share code, notes, and snippets.

@eenblam
eenblam / internet_radio_stream_aliases.sh
Created April 25, 2018 03:17 — forked from pwenzel/internet_radio_stream_aliases.sh
Internet Radio Streams Via Command Line
# 1. Install mplayer command line (via Brew, Macports, or APT)
# 2. Add the following aliases to ~/.profile
# 3. Type `source ~/.profile`
# 3. Type `news` or `current` to listen in your terminal
alias news="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/news.pls" # MPR News
alias current="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/the_current.pls" # The Current
alias classical="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/classical.pls" # Classical MPR
alias localcurrent="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/local.pls" # Local Current
alias heartland="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/radio_heartland.pls" # MPR Radio Heartland
@eenblam
eenblam / internet_radio_stream_aliases.sh
Created April 25, 2018 03:17 — forked from pwenzel/internet_radio_stream_aliases.sh
Internet Radio Streams Via Command Line
# 1. Install mplayer command line (via Brew, Macports, or APT)
# 2. Add the following aliases to ~/.profile
# 3. Type `source ~/.profile`
# 3. Type `news` or `current` to listen in your terminal
alias news="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/news.pls" # MPR News
alias current="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/the_current.pls" # The Current
alias classical="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/classical.pls" # Classical MPR
alias localcurrent="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/local.pls" # Local Current
alias heartland="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/radio_heartland.pls" # MPR Radio Heartland
import argparse
import csv
import sys
parser = argparse.ArgumentParser(description='Replace values on a column level in CSV')
parser.add_argument('--column', help='The column to replace in', required=True)
parser.add_argument('--search', help='The value to search for', required=True)
parser.add_argument('--replace', help='The value to replace it with', required=True)
parser.add_argument('data', help='The data being operated on', nargs='?',
@eenblam
eenblam / CaseClassMapping.scala
Created January 9, 2017 14:43 — forked from fancellu/CaseClassMapping.scala
Slick 2.x examples with MariaDB
package slick.lifted
import scala.slick.driver.MySQLDriver.simple._
import slick._
object CaseClassMapping extends App {
// the base query for the Users table
val users = TableQuery[Users]
from rx import Observable, Observer
from collections import defaultdict
users = [
{ "id" : 0, "name" : "Hero" },
{ "id" : 1, "name" : "Dunn" },
{ "id" : 2, "name" : "Sue" },
{ "id" : 3, "name" : "Chi" },
{ "id" : 4, "name" : "Thor" },
{ "id" : 5, "name" : "Clive" },
@eenblam
eenblam / index.html
Last active October 28, 2016 15:13 — forked from gka/index.html
(TODO: Update to D3v4) simple tables in D3
<!DOCTYPE html>
<!-- Source: http://bl.ocks.org/gka/17ee676dc59aa752b4e6 -->
<html>
<head>
<meta charset="utf-8">
<style>
.dash { width: 100%; }
table, #toggles { display: inline-block; }