Skip to content

Instantly share code, notes, and snippets.

@david-crespo
david-crespo / toggle_scroll.scpt
Created October 25, 2016 17:50
Toggle natural scrolling on MacOS
try
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events"
tell process "System Preferences"
click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
click checkbox 1 of tab group 1 of window "Trackpad"
@david-crespo
david-crespo / fetchPolls.js
Last active March 20, 2019 21:43
Fetch latest polls from 538 and ping IFTTT if there are any
#! /app/.heroku/node/bin/node
"use strict";
const moment = require('moment-timezone');
const request = require('request');
const _ = require('lodash');
const updatesURL = 'http://projects.fivethirtyeight.com/2016-election-forecast/updates.json';
const forecastURL = 'http://projects.fivethirtyeight.com/2016-election-forecast/US.json';
const notificationURL = 'https://maker.ifttt.com/trigger/new_polls/with/key/<YOUR_KEY_HERE>';

Keybase proof

I hereby claim:

  • I am david-crespo on github.
  • I am davidcrespo (https://keybase.io/davidcrespo) on keybase.
  • I have a public key whose fingerprint is F822 6F3D 1723 E9D5 782D 50EF 74DD 327E 01E2 1D5D

To claim this, I am signing this object: