Skip to content

Instantly share code, notes, and snippets.

View magalhini's full-sized avatar

Ricardo Magalhães magalhini

View GitHub Profile
@rjvdboon
rjvdboon / sports-tracker-download.js
Last active November 2, 2020 17:21 — forked from anonymous/sports-tracker-download.js
Download all workouts from sports-tracker
// based on this blog post:
// http://druss.co/2016/04/export-all-workouts-from-sports-tracker/
// then based on this gist implementation:
// https://gist.github.com/anonymous/9abc8d9c376bbc6aa853b477a50e8932
//
// I've changed it so you don't need to do the "Load More Workouts" (it is downloaded through the API)
// Added possible customizations (easy to switch between curl and powershell)
// Get the url to use from the current document
// Fix the token parsing, it failed because there is no trailing ';'
// Added a # token at the end of the download command so you don't need to post-process when using firefox
@maryrosecook
maryrosecook / ...
Last active September 13, 2018 18:17
Reminders to myself to help me get better at programming. I don't always manage to do these things, but I try. Please feel free to add your own reminders to yourself in the comments below!
We couldn’t find that file to show.
@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
@hamstu
hamstu / parallax.js
Last active February 7, 2024 15:20
Parallax Example: JavaScript
var ParallaxManager, ParallaxPart;
ParallaxPart = (function() {
function ParallaxPart(el) {
this.el = el;
this.speed = parseFloat(this.el.getAttribute('data-parallax-speed'));
this.maxScroll = parseInt(this.el.getAttribute('data-max-scroll'));
}
ParallaxPart.prototype.update = function(scrollY) {
@tkafka
tkafka / LICENSE.txt
Last active September 5, 2019 13:38
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@Integralist
Integralist / 1. Breakdown of Monads.js
Last active March 6, 2016 18:02
Monads in JavaScript and the power of composability
// The Monad design pattern functions
// i.e. compose, bind, unit, lift
// These are functions that are part of the design pattern's "interface"
// Their implementation can change (well, maybe not `compose`)
// but these function identifiers should be implemented
// as other devs will use those identifiers as a common language
// when discussing the Monad pattern
// compose = returns a function that takes a data structure (accepted data structure argument is passed to `g` and then result of that is passed to `f`)
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);