Skip to content

Instantly share code, notes, and snippets.

Anthony Ringoet anthonyringoet

Block or report user

Report or block anthonyringoet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anthonyringoet
anthonyringoet / clean.js
Created Aug 12, 2019
golden cheetah / road grand tours activity cleanup
View clean.js
// Road grand tours imported activities in Golden Cheetah give issues if there are multiple entries per second.
// The detail view seems to be correct but it leads to incorrect max wattages in the trends overview.
const fs = require('fs');
const { set, find, forEach } = require('lodash')
const activityData = require('./input.json')
const samples = activityData.RIDE.SAMPLES
let updatedSamples = []
View gist:5878a79c9e29a25fa0a0d3f3cd61509f
# Usage:
##########
# dcu : docker-compose up -d
# dcd : docker-compose down
# dex <container>: execute a bash shell inside the RUNNING <container>
# di <container> : docker inspect <container>
# dim : docker images
# dip : IP addresses of all running containers
# dl <container> : docker logs -f <container>
# dnames : names of all running containers
@anthonyringoet
anthonyringoet / index.js
Created Jul 28, 2018
micro-sse-possible
View index.js
module.exports = async (req, res) => {
res.writeHead(200, {
'Connection': 'keep-alive',
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache'
});
setInterval(() => {
res.write({ foo: 'bar' });
}, 500)
View some-css.css
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
body {
margin: 0;
font-size: 0.8rem;
}
@anthonyringoet
anthonyringoet / data.csv
Created Aug 12, 2015
data! from editdata.org!
View data.csv
foo meh
bar wow
beep bop
View trash.sh
#!/bin/bash
rm -Rf ~/.Trash/*
@anthonyringoet
anthonyringoet / gulpfile.js
Created Dec 9, 2014
Tiny static live reload server
View gulpfile.js
var gulp = require('gulp');
var livereload = require('gulp-livereload')
var port = process.env.PORT || 4444;
gulp.task('server', function(next) {
var finalhandler = require('finalhandler');
var http = require('http');
var serveStatic = require('serve-static');
var serve = serveStatic(__dirname, {'index': ['index.html']});
View debug.css
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
View index.js
var Game = require('crtrdg-gameloop');
var canvas = document.createElement('canvas');
canvas.id = 'game';
var body = document.getElementsByTagName('body')[0];
body.appendChild(canvas);
var game = new Game({
canvasId: 'game',
View index.js
var Game = require('crtrdg-gameloop');
var canvas = document.createElement('canvas');
canvas.id = 'game';
var body = document.getElementsByTagName('body')[0];
body.appendChild(canvas);
var game = new Game({
canvasId: 'game',
You can’t perform that action at this time.