Skip to content

Instantly share code, notes, and snippets.

View ryanerato's full-sized avatar

ryanerato

  • California, United States
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ryanerato on github.
  • I am buzzalderaan (https://keybase.io/buzzalderaan) on keybase.
  • I have a public key whose fingerprint is CED9 3C2F 92D2 6A57 F602 10C4 6D0E 7221 1708 1177

To claim this, I am signing this object:

@ryanerato
ryanerato / AutoTune_SomaFM_MPD.rb
Created April 1, 2019 21:57 — forked from rtlong/AutoTune_SomaFM_MPD.rb
Use this simple ruby script to automate grabbing all the SomaFM stations and saving each as a playlist into MPD.
# Make sure you can use mpc from your command line before running this.
soma = { "Groove Salad (ambient/electronica)" => 'groovesalad',
"Suburbs of Goa (world)" => 'suburbsofgoa',
"Lush (electronica)" => 'lush',
'Digitalis (electronica/alternative)' => 'digitalis',
'480 Minutes (alternative)' => '480min',
'Indie Pop Rocks! (alternative)' => 'indiepop',
'PopTron (alternative)' => 'poptron',
'Black Rock FM (eclectic)' => 'brfm',
@ryanerato
ryanerato / better-nodejs-require-paths.md
Created July 7, 2016 19:45 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@ryanerato
ryanerato / AMD-factory-with-require.js
Created June 17, 2016 21:06 — forked from unscriptable/AMD-factory-with-require.js
Simple AMD/node boilerplate. These aren't quite "normal" AMD and aren't "pure" CJS, but work in AMD loaders and node-like environments (like RingoJS).
// Typical AMD factory that returns a value, but uses an r-value (sync) require(),
// rather than a long, awkward dependency list.
// You cannot use module.exports or exports to declare the module:
(function (define){
define(function (require) {
"use strict";
var mod = require('pkb/modA');
return {
@ryanerato
ryanerato / 1-instructions.md
Created June 17, 2016 21:06 — forked from briancavalier/1-instructions.md
Hello wired for wire.js in node

Hello wire in node.js

  1. mkdir hello-wire
  2. cd hello-wire
  3. npm install wire
  4. Create main.js and spec.js as per the files in this gist.
  5. node main.js
server {
server_name trailers.apple.com atv.plexconnect;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8091;
}

Keybase proof

I hereby claim:

  • I am ryanerato on github.
  • I am buzzalderaan (https://keybase.io/buzzalderaan) on keybase.
  • I have a public key whose fingerprint is FE47 1037 5AAD 9F4E B5F8 CC8D FC42 E078 06CF 0152

To claim this, I am signing this object: