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
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
-- 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"
-- 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
#!/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
@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 / instantkali.sh
Created March 8, 2018 13:21 — forked from jgamblin/instantkali.sh
Start an EC2 Kali Instance In Under 60 Seconds.
#!/bin/bash
set -e
set -u
clear
ami="ami-10e00b6d"
size="t2.medium"
today=$(date +"%m-%d-%y-%H%M")
localip=$(curl -s https://ipinfo.io/ip)
@bunam
bunam / Kernel Extension Policy.mobileconfig
Created September 7, 2018 12:38 — forked from MagerValp/Kernel Extension Policy.mobileconfig
Sample kernel extension whitelist for 10.13.4+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>AllowUserOverrides</key>
<true/>
<key>AllowedTeamIdentifiers</key>
@bunam
bunam / git-create-revisioninfo-hook.sh
Created April 10, 2019 06:47 — forked from ThomDietrich/git-create-revisioninfo-hook.sh
git hook for revision and branch version file
#!/bin/bash
## Automatically generate a file with git branch and revision info
##
## Example:
## [master]v2.0.0-beta-191(a830382)
## Install:
## cp git-create-revisioninfo-hook.sh .git/hooks/post-commit
## cp git-create-revisioninfo-hook.sh .git/hooks/post-checkout
## cp git-create-revisioninfo-hook.sh .git/hooks/post-merge