Skip to content

Instantly share code, notes, and snippets.

@wechain
wechain / recursive-m4v-convert.sh
Last active November 20, 2022 10:35 — forked from philroche/recursive-m4v-convert.sh
Recursively convert all files using HandbrakeCLI and save to new folder.
#!/bin/bash
#
# Change this to specify a different handbrake preset. You can list them by running: "HandBrakeCLI --preset-list"
#
#set -ux
set +e
PRESET="Vimeo YouTube 720p30" # or Fast 720p30 or Fast 1080p30
if [ -z "$1" ] ; then
TRANSCODEDIR="."
else
@imaustink
imaustink / update-call-expressions.js
Last active December 1, 2017 18:34
A code mod to convert helper expressions to call expressions
const fs = require('fs');
const path = require('path');
const readFile = promisify(fs.readFile);
const writeFile = promisify(fs.writeFile);
const glob = promisify(require('glob'));
const GLOB_PATTERN = `**/*.{md,html,js}`;
const EACH_AS_REGEX = /([^\}+]*)#each\s+([^\s]*)\s+as\s+([^\s|\}]*)/gm;
const HELPER_EXPRESSION_REGEX = /(\{+)(#if|#unless|#each|#with|log|deubgger|#eq|#is|#switch|#case|#default|joinbase|#routeCurrent|routeUrl)\s+([^\}]*)/gm;
@sszabolcs
sszabolcs / CanJS 3 AMD build scripts
Last active February 11, 2024 22:49
CanJS 3 AMD build
These are the scripts I use to build CanJS 3 in AMD format.
@kwilcox
kwilcox / flask_admin.py
Last active June 20, 2019 13:42
WTForms and GeoAlchemy2
from flask.ext.admin.contrib.sqla import ModelView
# 'location' is the GeoAlchemy2 column
class FeatureView(ModelView):
...
form_overrides = dict(location=WTFormsMapField)
form_args = dict(
location=dict(
geometry_type='Polygon', height=500, width=500, cloudmade_api="{your_api}"
)