Skip to content

Instantly share code, notes, and snippets.

Andy Soell amsoell

Block or report user

Report or block amsoell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am amsoell on github.
  • I am amsoell (https://keybase.io/amsoell) on keybase.
  • I have a public key ASAAms-XVTMfD1gz2EegTVlkHfGEaJE_0AmwFGngEsTOmgo

To claim this, I am signing this object:

@amsoell
amsoell / prepare-commit-msg
Created Feb 21, 2018
Include last 5 commit messages and hashes in default Git commit message
View prepare-commit-msg
#!/bin/sh
ORIG_MSG_FILE="$1"
TEMP=`mktemp /tmp/git-msg-custom`
trap "rm -f $TEMP" exit
LAST10=`git log --oneline -5 | sed -e 's/^/# /'`
(printf "\n\n# Last 5 Commits:\n%s \n\n" "$LAST10"; cat "$ORIG_MSG_FILE") > "$TEMP"
cat "$TEMP" > "$ORIG_MSG_FILE"
@amsoell
amsoell / php2s3.php
Last active Apr 7, 2017
Long-form example of uploading files to Amazon S3 with PHP
View php2s3.php
//*** save report to s3
// Kudos to usefulangle: http://usefulangle.com/post/34/aws-s3-upload-api-php-curl
$aws_access_key_id = 'xxx';
$aws_secret_access_key = 'xxx';
$bucket_name = 'xxx';
$aws_region = 'us-west-1';
$host_name = $bucket_name . '.s3-' . $aws_region . '.amazonaws.com';
$content = file_get_contents($report_file);
$content_acl = 'authenticated-read';
$content_type = 'application/pdf';
@amsoell
amsoell / Preferences.sublime-settings
Last active Oct 10, 2016
Sublime Text 3 preferences
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"draw_minimap_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_options":
[
View .bitnamirc
export PS1="\[\033[38;5;82m\]\u\[$(tput sgr0)\]\[\033[38;5;2m\]@\[$(tput sgr0)\]\[\033[38;5;15m\]\[\033[48;5;1m\] \[$(tput bold)\]MAMP ENVIRONMENT\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[48;5;1m\] \[$(tput sgr0)\]:\[\033[38;5;8m\][\[$(tput sgr0)\]\[\033[38;5;7m\]\w\[$(tput sgr0)\]\[\033[38;5;8m\]]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
View .bash_profile
# Save all the history. For posterity.
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
export HISTFILE=~/.bash_eternal_history
export PATH="/usr/local/bin/spark/:/usr/local/Cellar/php71/7.1.8_20/bin/:/opt/local/sbin:~/.composer/vendor/bin:/usr/local/php5/bin:./node_modules/.bin:~/Library/Python/2.7/bin:/opt/local/bin:$PATH"
#export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH"
# Git magic
You can’t perform that action at this time.