Skip to content

Instantly share code, notes, and snippets.

@openoms
openoms / add_zerotier.sh
Last active May 14, 2022 20:56 — forked from solarmicrobe/add_zerotier.sh
Add zerotier to TrueNAS
#! /usr/bin/env sh
pkg install wget -y
echo "# Check the latest version at: https://www.freshports.org/net/zerotier/"
echo "# Which version to install?"
echo "# Example:"
echo "1.6.5"
read VERSION
@kljohann
kljohann / split_transactions.py
Last active June 10, 2022 22:44
split transactions by posting date (beancount)
__author__ = "Johann Klähn <kljohann@gmail.com>"
import collections
import math
import itertools
import datetime
from beancount.core import data
from beancount.core.interpolate import balance_incomplete_postings
@boylee1111
boylee1111 / protocolEnumeration
Created April 3, 2015 10:25
A Swift Tour. Write an enumeration that conforms to this protocol.
protocol ExampleProtocol {
var simpleDescription: String { get }
mutating func adjust()
}
enum SimpleEnum : String, ExampleProtocol {
case Before = "", After = " (whatever)"
var simpleDescription: String {
get {
return "A simple enum." + self.rawValue
@joelhooks
joelhooks / gear.md
Last active April 2, 2024 20:18
Podcasting Gear List
@clayton
clayton / ffmpeg-install.sh
Created August 9, 2013 18:55
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@mattly
mattly / house.md
Last active December 20, 2015 07:48

House Shopping

rate(term, amount) =
    let n = term * 12/year in
    let r = ir / (12/year) in
    r/(1 - (1+r)^(-n)) * amount
    
house at(house) =
    let fifteen = rate(15year, house - down payment) in

let thirty = rate(30year, house - down payment) in

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@rjw57
rjw57 / CGSPrivate.h
Last active December 2, 2022 06:36
CGSPrivate.h - undocumented APIs for OSX. Re-licensed under MIT licence.
/* CGSPrivate.h -- Header file for undocumented CoreGraphics stuff. */
/* This file is a relicensed portion of DesktopManager and was originally released under
* the terms of the GNU General Public Licence. Original licence text follows the new terms.
* The contents of this file has been re-released by the original author under the following terms:
*
* Copyright (C) 2003, 2004, 2013 Richard J Wareham <richwareham@users.sourceforge.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@seltzered
seltzered / IllustratorSaveAsSVGs.jsx
Last active August 1, 2023 17:56
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source