Skip to content

Instantly share code, notes, and snippets.

@mneedham
mneedham / app.py
Last active June 4, 2024 18:09
Mapping Strava runs using Leaflet and Open Street Map
from flask import Flask
from flask import render_template
import csv
import json
app = Flask(__name__)
@app.route('/')
def my_runs():
runs = []
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active November 15, 2024 03:00
tmux Cheat Sheet
@amitkaps
amitkaps / gh-pages.md
Last active January 21, 2019 13:23
Keeping gh-pages and website/_site folder in sync for Jekyll

Keeping gh-pages in sync with master for Jekyll sites

You have one single repo (master) in which you have both project code (project) and the project website (website) which you want to push to gh-page. The directory structure looks like this.

-- project
	    |-- website 
	    |       |-- _layouts
	    |       |-- _includes
	    |       |-- _posts
@bbx10
bbx10 / ESPWebSock.ino
Last active June 5, 2024 20:16
ESP8266 Web server with Web Socket to control an LED
/*
* ESP8266 Web server with Web Socket to control an LED.
*
* The web server keeps all clients' LED status up to date and any client may
* turn the LED on or off.
*
* For example, clientA connects and turns the LED on. This changes the word
* "LED" on the web page to the color red. When clientB connects, the word
* "LED" will be red since the server knows the LED is on. When clientB turns
* the LED off, the word LED changes color to black on clientA and clientB web
@andrewburgess
andrewburgess / bootstrap-infiniteScroll.js
Last active January 24, 2024 23:49
Twitter Bootstrap plugin that enables infinite scrolling
/* ============================================
* bootstrap-infiniteScroll.js
* ============================================ */
!function ($) {
'use strict';
var InfiniteScroll = function (el, options) {
this.$element = $(el);
this.$data = $(el).data();
this.$options = options;