Skip to content

Instantly share code, notes, and snippets.

@dpo
dpo / mail2things.scpt
Last active December 13, 2015 20:08
An Automator workflow to add an email from Mail.app to Things' Inbox. This is a modification of http://dl.dropbox.com/u/8019/MailToThings.scpt. Create an Automator Service, start with "Get Selected Mail Messages", then "Run AppleScript" and paste the contents of this gist as script. Subsequently, you can process the list of new todo items. I lik…
on run {input, parameters}
set todoList to {}
repeat with theMessage in input
-- Grab message info.
tell application "Mail"
-- Remove apostrophes from Subject as they wreak havoc.
set AppleScript's text item delimiters to {"'"}
@evands
evands / combine_static_libraries.sh
Created January 14, 2015 20:40
Combine multiple .a static libraries, which may each have multiple architectures, into a single static library
#!/bin/sh
# Combined all static libaries in the current directory into a single static library
# It is hardcoded to use the i386, armv7, and armv7s architectures; this can easily be changed via the 'archs' variable at the top
# The script takes a single argument, which is the name of the final, combined library to be created.
#
# For example:
# => combine_static_libraries.sh combined-library
#
# Script by Evan Schoenberg, Regular Rate and Rhythm Software
@evands
evands / combine_matching_static_libraries.sh
Created January 15, 2015 02:55
Combine libraries of matching names but different architectures from directory $1 and directory $2 # into directory $3.
#!/bin/sh
#
# Combine libraries of matching names but different architectures from directory $1 and directory $2
# into directory $3.
#
# Usage:
# => combine_matching_static_libraries.sh DIR_INPUT_1 DIR_INPUT_2 DIR_OUTPUT
######
pushd $1
// "License": Public Domain
// I, Mathias Panzenb�ck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
// an example on how to get the endian conversion functions on different platforms.
#ifndef PORTABLE_ENDIAN_H__
#define PORTABLE_ENDIAN_H__
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
@cosmo0920
cosmo0920 / mingw-w64-4.0.4-osx10.11.2.sh
Last active May 28, 2022 03:02 — forked from Drakulix/mingw-w64-3.10-osx10.9.sh
Script to install a Mingw-w64 Cross-Compiler Suite on Mac OS X 10.11.2
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
brew tap homebrew/versions
@rudelm
rudelm / autofs.md
Last active November 5, 2024 01:57
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active October 29, 2023 18:26
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04