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 / murl.txt
Last active January 1, 2017 23:34
All Ringtones for iPhone from nasa
# Taken from https://www.nasa.gov/connect/sounds/index.html
# with js help : $("a").each(function (){url=$(this).attr("href");if(url!=undefined && url.match(/.m4r$/)){ console.log(url)} });
# Grab all with
# curl -S https://gist.githubusercontent.com/bunam/cfd643b04f306829b280aa21766290ae/raw/2a341ae098cc1d21f5bed6308416c3fb9c17ffe1/murl.txt | grep -v '^ *#' | xargs -n 1 curl -OL
http://www.nasa.gov/640376main_APU_Shutdown.m4r
http://www.nasa.gov/640379main_Computers_are_in_Control.m4r
http://www.nasa.gov/640381main_Go_at_Throttle_Up_2.m4r
http://www.nasa.gov/640380main_Go_at_Throttle_Up.m4r

Keybase proof

I hereby claim:

  • I am bunam on github.
  • I am bunam (https://keybase.io/bunam) on keybase.
  • I have a public key ASDUp2rZu0fCtf6zLARuiNAV9uQlLuoZa_U1E0BMjt-sVwo

To claim this, I am signing this object:

@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)