I hereby claim:
- I am bennylope on github.
- I am bennylope (https://keybase.io/bennylope) on keybase.
- I have a public key whose fingerprint is 515A 85FE D3A7 9935 5E9E 2F6C CA23 6BC4 054B 7C47
To claim this, I am signing this object:
-- From http://www.haskellforall.com/2015/10/basic-haskell-examples.html | |
putTodo :: (Int, String) -> IO () | |
putTodo (n, todo) = putStrLn (show n ++ ": " ++ todo) | |
prompt :: [String] -> IO () | |
prompt todos = do | |
putStrLn "" | |
putStrLn "Current TODO list:" | |
mapM_ putTodo (zip [0..] todos) |
I hereby claim:
To claim this, I am signing this object:
-- from http://www.haskellforall.com/2015/10/basic-haskell-examples.html | |
import System.Directory | |
import System.Environment | |
import System.IO | |
putTodo :: (Int, String) -> IO () | |
putTodo (n, todo) = putStrLn (show n ++ ": " ++ todo) | |
prompt :: [String] -> IO () | |
prompt todos = do |
#!/usr/bin/env python | |
""" | |
Script that copies contents of .env file to envdir compatible folder | |
:copyright: Ben Lopatin | |
:license: BSD | |
""" | |
import os | |
import sys |
""" | |
Remote environment variable configuration using envdir | |
This should be set up using a `fabfile/` module rather than | |
an individual `fabfile.py` file. | |
$ fab <env> config -- list environment variables (incl. values) | |
$ fab <env> config.set:DEBUG=False -- set a single variable | |
$ fab <env> config.set:DEBUG=False,SECRET=jdkjkjk -- set multiple variables |
#!/usr/bin/env bash | |
# Copyright 2016, Ben Lopatin | |
# Licensed freely to use, modify, and redistribute under GNUGPLv3 | |
APIKEY=$LEANPUB_API_KEY | |
SLUG=$LEANPUB_SLUG | |
case "$1" in | |
preview) |
#!/usr/bin/env python3 | |
""" | |
Script for exporting GitHub Issues to an import ready CSV format. | |
Outputs to stdout for redirection. | |
It is hard coded (sorry) to include up to 2 comments from an issue. | |
Usage: |
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" |
#!/bin/bash | |
# | |
# A short helper script to decode QuickTime .mov files to mp4 files using default settings. | |
# | |
# Usage: | |
# ./trim-movie.sh path/to/source.mov path/to/destination.mp4 | |
# ./trim-movie.sh path/to/source.mov path/to/destination.mp4 1080 | |
# | |
# The optional third paramater is width. You may need to respecify this if you encounter | |
# divisibility by 2 errors. Not sufficiently motivated to bother checking the size and |