Skip to content

Instantly share code, notes, and snippets.

View vielmetti's full-sized avatar
🌴
I may be slow to respond.

Edward Vielmetti vielmetti

🌴
I may be slow to respond.
View GitHub Profile
@corychainsman
corychainsman / Raspberry_Pi_Water_Sensor
Last active May 28, 2024 12:55
Raspberry Pi Water Sensor - Incredibly vague schematic here: http://fritzing.org/projects/raspberry-pi-water-sensor/
#!/usr/bin/python
#########
# About #
#########
# This script uses a Raspberry Pi to sense for the presense or absense of water.
# If there is water, an email is sent and a buzzer goes off.
# When it's dry again, another email is sent, and the buzzer turns off.
@hrbrmstr
hrbrmstr / index.html
Last active April 8, 2024 12:19
Graphing Maine power outages with D3. The "meta refresh" is the sub-optimal way of updating every 5 minutes, but the fam was getting a bit irked that I was coding on Thanksgiving. See previous gists and http://rud.is/b entries for why I made this. UPDATE : 2013-12-23 : mouseover now shows historical graphs of outages; data table cleaned up and t…
<!DOCTYPE html>
<!--
-- by @hrbrmstr (2013)
-- MIT License
-->
<html>
<head>
<title>Central Maine Power Live Outage Map</title>
<meta charset="utf-8"/>
<meta http-equiv="refresh" content="300"/>
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@Luzifer
Luzifer / README.md
Last active August 25, 2019 12:34
Strategies for persistent data storage on CoreOS-cluster

Persistent data storage on CoreOS-cluster

Storing the data on the host machine

Data directories are created in /home/coreos and mounted into the container using volume cli options of docker run. All data the container writes is stored on the host and as long as the host persists safe against container restarts / recreates.

  • Pro
    • No effort, just create the directories and mount them into the container
  • Contra
  • Container is bound to host (unable to failover)
@eby
eby / gist:3be73d59ca21b1c707ac
Last active August 29, 2015 14:22
mcb-power-recent
07/02/2015 21:53:52 System: Coldstart.
07/02/2015 20:05:04 UPS: Switched to battery backup power.
06/23/2015 00:47:30 UPS: Returned from battery backup power.
06/23/2015 00:47:02 UPS: Switched to battery backup power.
06/06/2015 16:15:37 UPS: Returned from battery backup power.
06/06/2015 16:15:32 UPS: Switched to battery backup power.
06/06/2015 14:18:01 UPS: Returned from battery backup power.
06/06/2015 14:18:01 UPS: Switched to battery backup power.
05/11/2015 16:37:05 UPS: Returned from battery backup power.
05/11/2015 16:37:04 UPS: Switched to battery backup power.
@kgorskowski
kgorskowski / coreos-efs-cloud-config
Created July 10, 2015 10:37
coreos cloud-config file for dynamically mount aws efs in the right availability zone
#cloud-config
write-files:
- path: /etc/conf.d/nfs
permissions: '0644'
content: |
OPTS_RPC_MOUNTD=""
users:
- name: XYZ
groups:
@rvanbruggen
rvanbruggen / loadgtfs.cql
Last active April 17, 2024 22:45
Loading and Querying GTFS data
//LOAD CSV script for GFTS data
create constraint on (a:Agency) assert a.id is unique;
create constraint on (r:Route) assert r.id is unique;
create constraint on (t:Trip) assert t.id is unique;
create index on :Trip(service_id);
create constraint on (s:Stop) assert s.id is unique;
create index on :Stoptime(stop_sequence);
create index on :Stop(name);
schema await
@charity
charity / gist:d216810052c8cac23605
Created February 17, 2016 21:32
How to get all aws account limits.
$ for svc in $(aws list 3>&1 1>&2 2>&3 3>&- | sed -e '1,7d' |sed -e 's/\|//g') ; do aws $svc describe-account-attributes 2>/dev/null || echo "not supported for $svc" ; done
@csalzman
csalzman / ridebetter.js
Last active September 14, 2016 18:02
Make The Ride's Live Maps So Much Better
//Use this on The Ride's Live Maps page:
//http://www.theride.org/Schedules-Maps-and-Tools/Live-Maps
//Find an extension or plugin that let's you run your own javascript on a page
//I'm using "Custom JavaScript for websites" in Chrome.
//Replace the array with the route numbers you care about. Just the number
var routesYouCareAbout = [65, 23];
@rn
rn / packet.net.md
Last active November 14, 2017 14:52
arm64 server setup

This document outlines steps and common tasks for setting up a arm64 dev machine for LinuxKit.

Notes on packet.net

If you set up a server on packet.net using the docker account please use your name/slackhandle/initials in the machine name. We will garbage collect machine and whack machine not adhering to this policy without warning :).

Deploy a Ubuntu 16.04 LTS server on packet.net and ssh in as root.