Skip to content

Instantly share code, notes, and snippets.

View crmpicco's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿
Blahem

Craig R Morton crmpicco

🏴󠁧󠁢󠁳󠁣󠁴󠁿
Blahem
View GitHub Profile
@crmpicco
crmpicco / bootstrap_3_layout.html.twig
Created January 24, 2019 02:49
Bootstrap 3 form_errors block
{% block form_errors -%}
{% if errors|length > 0 -%}
{% if form is not rootform %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
<ul class="list-unstyled">
{%- for error in errors -%}
<li><span class="glyphicon glyphicon-exclamation-sign"></span> {{ error.message }}</li>
{%- endfor -%}
</ul>
{% if form is not rootform %}</span>{% else %}</div>{% endif %}
{%- endif %}
@crmpicco
crmpicco / Permissions
Created August 20, 2019 09:03
Apache 403 Forbidden after uninstalling built-in Apache and re-installing Apache with Homebrew
ps aux | grep httpd
_www 60997 0.0 0.0 4300784 476 ?? S 4:49pm 0:00.00 /usr/local/opt/httpd/bin/httpd -k start
_www 60996 0.0 0.0 4300784 456 ?? S 4:49pm 0:00.00 /usr/local/opt/httpd/bin/httpd -k start
_www 60995 0.0 0.0 4300784 456 ?? S 4:49pm 0:00.00 /usr/local/opt/httpd/bin/httpd -k start
_www 60994 0.0 0.0 4300784 456 ?? S 4:49pm 0:00.00 /usr/local/opt/httpd/bin/httpd -k start
root 26130 0.0 0.0 4300808 2032 ?? Ss 2:08pm 0:00.77 /usr/local/opt/httpd/bin/httpd -k start
crmpicco 76683 0.0 0.0 4268040 788 s001 S+ 5:00pm 0:00.00 grep httpd
_www 60998 0.0 0.0 4300784 456 ?? S 4:49pm 0:00.00 /usr/local/opt/httpd/bin/httpd -k start
@crmpicco
crmpicco / zshrc.sh
Created November 20, 2019 08:11
MacOS zshrc.sh
alias ll='ls -lG'
export EDITOR=$(which vim)
# Highlight the current autocomplete option
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
# Better SSH/Rsync/SCP Autocomplete
zstyle ':completion:*:(scp|rsync):*' tag-order ' hosts:-ipaddr:ip\ address hosts:-host:host files'
zstyle ':completion:*:(ssh|scp|ftp|sftp):*' hosts $hosts
zstyle ':completion:*:(ssh|scp|ftp|sftp):*' users $users
@crmpicco
crmpicco / zshrc.sh
Created June 15, 2020 09:23
zsh git prompt zshrc
# To install source this file from your .zshrc file
# see documentation at http://linux.die.net/man/1/zshexpn
# A: finds the absolute path, even if this is symlinked
# h: equivalent to dirname
export __GIT_PROMPT_DIR=${0:A:h}
export GIT_PROMPT_EXECUTABLE=${GIT_PROMPT_EXECUTABLE:-"python"}
# Initialize colors.
@crmpicco
crmpicco / dedupe_mandrill.py
Created February 20, 2023 07:58
De-dupe the signup email send list with the send list export from Sendy
#!/usr/bin/python
# De-dupe the signup email send list with the send list export from Sendy
import os
import sys
import csv
import pprint
signup_emails = []