Skip to content

Instantly share code, notes, and snippets.

@fullmetalsheep
fullmetalsheep / trueautosub.lua
Last active June 26, 2023 12:52 — forked from selsta/autosub.lua
Automatically download subtitles in mpv using subliminal.
-- requires subliminal, version 1.0 or newer
-- default keybinding: b
local utils = require 'mp.utils'
--sleep function, so that subs aren't downloaded the instant a file is loaded
--taken from:http://lua-users.org/wiki/SleepFunction
function sleep(s)
local ntime = os.time() + s
repeat until os.time() > ntime
end
@cassus
cassus / Dev platform settings
Created November 1, 2016 14:54
Zapier app to read Activity and Sleep data from FitBit
## Triggers (Bringing data into Zapier)
### Sleep - polling
https://api.fitbit.com/1/user/-/sleep/date/today.json
### Activity - polling
https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=today&sort=desc&limit=10&offset=0
## Scripting API
see script.js
@skevy
skevy / gist:8a4ffc3cfdaf5fd68739
Last active February 4, 2017 04:59
Redux with reduced boilerplate

Note

I would recommend @acdlite's redux-actions over the methods suggested in this Gist.

The methods below can break hot-reloading and don't support Promise-based actions.

Even though 'redux-actions' still uses constants, I've come to terms with the fact that constants can be good, especially in bigger projects. You can reduce boilerplate in different places, as described in the redux docs here: http://gaearon.github.io/redux/docs/recipes/ReducingBoilerplate.html


@hcurotta
hcurotta / post-merge
Created October 17, 2014 14:34
Post Merge git hook to trigger codeship deployment when using BitBucket
#!/bin/bash
branch_name=$(git symbolic-ref --short HEAD)
if [ "$branch_name" == 'dev' ] || [ "$branch_name" == 'staging' ]
then
git commit --allow-empty -m 'empty commit to trigger deployment'
fi
@mtrencseni
mtrencseni / SystemsThinking.md
Last active May 29, 2020 00:41
Systems Thinking

Systems thinking

Intro

  • how I heard about systems thinking
  • what it is
  • how I applied it at Prezi
  • steal my job!
@slashdotdash
slashdotdash / README.md
Last active September 19, 2019 18:30
React + D3 (v2)

Multi-series bar chart rendered using React and D3.

<?php
require_once dirname(__FILE__).'/../lib/symfony/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->getEventDispatcher()->connect(