Skip to content

Instantly share code, notes, and snippets.

View bunam's full-sized avatar
🏠
Working from home

bunam

🏠
Working from home
  • French Alps
View GitHub Profile
@bunam
bunam / .bash_profile
Created October 9, 2016 21:45 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@bunam
bunam / mailcatcher
Last active March 30, 2016 15:14 — forked from dayio/mailcatcher.sh
#!/bin/bash
#
# mailcatcher This shell script takes care of starting and stopping
# the mailcatcher fake/dev mail server.
# -> adduser mailcatcher
# -> chkconfig mailcatcher on
# chkconfig: - 64 36
# description: stop and start mailcatcher fake mail server
# processname: mailcatcher
# config: /etc/mailcatcher.cnf
-- based on http://pastebin.com/MSPZWWAj
-- which was in turn based on https://gist.github.com/2006738
-- but will open a new tab in the current terminal if one is open, rather than always creating a new terminal
tell application "BBEdit" to set theFile to file of document 1
tell application "Finder" to set theFolder to (container of file theFile) as alias
set theUnixPath to POSIX path of theFolder
tell application "iTerm"
if exists current terminal then
-- Use Instapaper to export a CSV file of your articles.
-- Must have Numbers to open it in.
-- Will create PDF documents in /Instapaper/<your folder in Instapaper> groups.
-- Be sure to select an open database in DT Pro before you run this.
--
-- Created by Annard Brouwer, 24/08/2014
-- Share and enjoy!
property kCSVFileType : "csv"
property kRootGroupName : "Instapaper"
property phpref : "/usr/bin/env php -l "
on phpErrLine(php_msg, bbfref)
set errIndicator to " in " & (POSIX path of bbfref) & " on line "
set off to (offset of errIndicator in php_msg) + (length of errIndicator)
get text off thru -1 of php_msg
return first paragraph of result as integer
end phpErrLine
on phpErrMsg for bbfref out of php_msg