Skip to content

Instantly share code, notes, and snippets.

Avatar

Rob McAuley rmcauley

View GitHub Profile
View music.md

Adding Music to your Rainwave Library

Locate the "song_dir" entry from your configuration file and copy/paste your music library to this directory.

Note: If using a remote Linux server you will need to use SFTP/SSH, or install vsftpd or similar FTP server package, to upload music to the directory.

  • Your MP3 tags must be accurate. Rainwave reads the tags to obtain track information, which is necessary to manage song rotation.
View prereq.md

Prerequisites

Authentication for Rainwave users is dependant on phpBB.

  • If you want users to use your site for voting, rating, and requesting, you'll have to install the latest phpBB, 3.1 or above.
  • If you're just running Rainwave for streaming audio, you do not need phpBB.
  • If you are just testing/developing locally, you do not need phpBB.

phpBB and Rainwave must share the same database. Rainwave uses phpBB's

View websocket.js
var RainwaveAPI = function() {
"use strict";
// Setup ************************************************************************************************
var _sid, _url, _userID, _apiKey;
var userIsDJ;
var socket, socketStaysClosed, socketIsBusy;
var socketErrorCount = 0;
var getQueue = [];
View blah.py
# this is for websocket support, takes a string message that is ostensibly JSON formatted from the browser
# formatting should be { "action": "[name of action/call/function]", "sid": [integer] }
# any other arguments will be handled by an individual function that takes care of validation
# except auth which you'll see below
try:
message = json.loads(message)
except:
self.write_message({ "wserror": { "tl_key": "invalid_json", "text": self.locale.translate("invalid_json") } })
return
View gist:bf584db91d7e85b45b7e4fd33b5036bb
25,200 RAM https://www.ark-pc.co.jp/i/11757963/
24,147 Mobo http://shop.tsukumo.co.jp/goods/4529327935759/201710010420000
42,843 CPU
9,280 PSU https://www.ark-pc.co.jp/i/15600924/
14,780 Case http://shop.tsukumo.co.jp/goods/4537694191098/202510000000000
17,980 SSD http://shop.tsukumo.co.jp/goods/4988755022330/201405000000000
17,980 SSD http://shop.tsukumo.co.jp/goods/4988755022330/201405000000000
7,253 HDD http://shop.tsukumo.co.jp/goods/0718037817231/201205005000000
7,253 HDD http://shop.tsukumo.co.jp/goods/0718037817231/201205005000000
14,853 Windows 10 Home 64-bit
View rainwave-liq.log
2016/03/19 00:54:19 [request.dynamic_5502:3] Finished with "/home/icecast/cover-all/Wild Arms/Obtuse_BrandonStrader_WildArms-LunarTwilight_RTS.mp3".
2016/03/19 00:54:19 [amplify_5505:3] End of the current overriding.
2016/03/19 00:54:19 [request.dynamic_5502:3] Prepared "/home/icecast/silence_5min.mp3" (RID 1).
2016/03/19 00:54:19 [smart_cross_5507:3] Analysis: -101.758517dB / -infdB (4.02s / 1.98s)
2016/03/19 00:54:19 [smart_crossfade:3] Metadata crossfade is 2 on starting song, fading out
2016/03/19 00:54:24 [server:3] New client unix socket "3\181\182\127".
2016/03/19 00:54:24 [server:3] Client unix socket "3\181\182\127" disconnected without saying goodbye..!
2016/03/19 00:54:24 [covers(dot)mp3:3] Performing user-requested skip
2016/03/19 00:54:24 [request.dynamic_5502:3] Finished with "/home/icecast/silence_5min.mp3".
2016/03/19 00:54:24 [smart_cross_5507:3] Analysis: -nandB / -nandB (0.00s / 0.00s)
View rainwave.liq
r4_offline_file = "/home/icecast/~misc/cover-offline.mp3"
r4_sid = "3"
r4_dest_mount = "covers"
r4_dest_desc = "Rainwave Covers"
r4_dest_url = "http://covers.rainwave.cc"
r4_harbor_port = 31233
##################
set("log.level", 3)
View getdecibel.js
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var source;
var analyser = audioCtx.createAnalyser();
analyser.minDecibels = -60.0;
analyser.maxDecibels = 0.0;
analyser.smoothingTimeConstant = 0.8;
analyser.fftSize = 128;
var javascriptNode = audioCtx.createScriptProcessor(1024);
View blah
<div class="mobile_rating unselectable needsclick" bind="el">
<div class="mobile_rating_header">
{{ $l("slide_to_rate") }}
</div>
<div class="mobile_rating_slider">
<div class="mobile_rating_on" bind="r1_0">1</div>
<div class="pointfive" bind="r1_5">.5</div>
<div bind="r2_0">2</div>
<div class="pointfive" bind="r2_5">.5</div>
<div bind="r3_0">3</div>
View getpocket-dig.txt
DNS REFERENCE
-------------
F:\Downloads\BIND9.10.3.x64>dig +trace @8.8.8.8 getpocket.com A
; <<>> DiG 9.10.3 <<>> +trace @8.8.8.8 getpocket.com A
; (1 server found)
;; global options: +cmd
. 20628 IN NS a.root-servers.net.
. 20628 IN NS b.root-servers.net.
You can’t perform that action at this time.