Skip to content

Instantly share code, notes, and snippets.

Rob McAuley rmcauley

View GitHub Profile
View gist:e5edb58b4175da4118fb61e5ef5cbfcc
<h2>Terms of Service</h2>
<ul>
<li>
By using Rainwave you agree to enjoy the music we stream, free of
worries about ad trackers or identifiable information.
</li>
</ul>
<h2>Privacy Policy</h2>
<ul>
View blargh.py
class AlbumRating(models.Model):
album = models.ForeignKey(Album, models.CASCADE, db_index=False)
user = models.ForeignKey(User, models.CASCADE, db_index=False)
rating_complete = models.BooleanField(
blank=True, null=True, db_column="album_rating_complete"
)
rating_user = models.FloatField(
blank=True, null=True, db_column="album_rating_user"
)
View gist:437f947788786a3948e202952fb7703c
function blah(props) {
return <div onClick={props.doThing}>{props.id}</div>
}
const mapStateToProps = state => ({id: state.thing.id});
const mapDispatchToProps = dispatch => ({
doThing: () => {
callMyApi('doThing', {iWantMappedProps.id});
},
View unicodechecke.sh
failed="no"
find . -name '*.py' -not -path "./.env/*" -not -path "./node_modules/*" -print0 |
while IFS= read -r -d $'\0' line; do
if [ -s $line ]; then
grep -L "from __future__ import unicode_literals" $line
if [ "$?" -ne "0" ]; then
failed="yes"
fi
fi
done
@rmcauley
rmcauley / smallart.txt
Created May 5, 2017
Small album art sizes on Rainwave
View smallart.txt
05-05 08:01:13 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original Chiptunes/Backloggery/42299925.jpg
05-05 08:01:14 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original Chiptunes/My Girl, The Princess/folder.gif
05-05 08:01:17 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original Chiptunes/8-Bit Empire/folder.jpg
05-05 08:01:17 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original Chiptunes/Grayscale Project/graylogo.gif
05-05 08:01:18 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original Chiptunes/Unconditional Acceleration/folder.png
05-05 08:01:22 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original Chiptunes/Artillery/folder.png
05-05 08:01:28 - CRITICAL - [scan ] Error scanning /home/icecast/chip-only/~~Original C
View gist:b4dae3754abf26c886b05b0b4a3abcd4
var iOSAppMode = window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.rainwavePlay;
if (iOSAppMode) {
self.play = function () {
window.webkit.messageHandlers.rainwavePlay.postMessage();
};
self.stop = function () {
window.webkit.messageHandlers.rainwaveStop.postMessage();
};
View gist:07d5df741d495dade717ef8034a4c3f1
set("log.file",true)
set("log.file.path","/tmp/basic-radio.log")
set("log.stdout",true)
set("log.level",5)
set("harbor.bind_addr","0.0.0.0")
def my_request_function() =
result = get_process_output("../resources/php/executeable/liquidsoap.php")
# Create and return a request using this result
request.create(result)
View auto_clean.txt
Disabled: /home/icecast/chip-all/Battle Arena Toshinden/02 Options.mp3
Disabled: /home/icecast/chip-all/Cloud Master/Mt. Gogyo.mp3
Disabled: /home/icecast/chip-all/Double Moon Densetsu/Battle.mp3
Disabled: /home/icecast/chip-all/Enduro Racer/05 Ending.mp3
Disabled: /home/icecast/chip-all/Game Boy Camera/58 Animation Theme 09.mp3
Disabled: /home/icecast/chip-all/Gemfire/18 Reunification (Ending Ishmeria).mp3
Disabled: /home/icecast/chip-all/Hero Core/17 boss (alternate).mp3
Disabled: /home/icecast/chip-all/Hero Quest (ZX Spectrum)/01 Title.mp3
Disabled: /home/icecast/chip-all/Kaze no Klonoa Moonlight Museum/Credits.mp3
Disabled: /home/icecast/chip-all/Maniac Mansion/04 Bernard's Theme.mp3
View nastyloops.js
// ye olde ie8-compatible way
function setupTheThing(thing, i) {
thing.addEventListener("click", function() { console.log(i); });
}
var i, thing;
for (i = 0; i < 5; i++) {
thing = document.getElementById("thing" + i);
setupTheThing(thing, i);
View gist:760d87176c651152ba4b57b3bf67c46b
user www-data;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
You can’t perform that action at this time.