Skip to content

Instantly share code, notes, and snippets.

View scottstanfield's full-sized avatar
🚀
:wq

Scott Stanfield scottstanfield

🚀
:wq
  • Relativity Space
  • California
  • 19:54 (UTC -07:00)
View GitHub Profile
@scottstanfield
scottstanfield / raspi-config.txt
Created January 21, 2020 04:50 — forked from damoclark/raspi-config.txt
Simple Raspbian Configuration Tool. Add file to boot partition of SD Card and run single command after booting Raspbian.
#/bin/sh
#
# Don't change the following lines unless you know what you are doing
# They execute the config options starting with 'do_' below
grep -E -v -e '^\s*#' -e '^\s*$' <<END | \
sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x -
#
############# INSTRUCTIONS ###########
#
# Change following options starting with 'do_' to suit your configuration
@scottstanfield
scottstanfield / tmux_conda_fix.md
Created January 12, 2020 21:59 — forked from ekreutz/tmux_conda_fix.md
Fix tmux messing with conda path

Fix tmux messing with conda

Problem: When running a conda environment and opening tmux on macOS, a utility called path_helper is run again. Essentially, the shell is initialized twice which messes up the ${PATH} so that the wrong Python version shows up within tmux.

Solution

If using bash, edit /etc/profile and add one line. (For zsh, edit /etc/zprofile)

...
@scottstanfield
scottstanfield / convertOM2OSXTags.sh
Created May 2, 2016 03:51 — forked from code2k/convertOM2OSXTags.sh
This script converts OpenMeta to OS X Mavericks tags.
#!/bin/bash
#
# This script converts OpenMeta to OS X Mavericks tags.
#
# http://code2k.net
#
# Copyright © 2013 CODE2K:LABS. All Rights Reserved.
mdfind "kMDItemOMUserTags == *" -onlyin "." | while IFS= read -r file; do
echo "$file"
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select

How-to setup a simple git push deployment

These are my notes basically. I first created this just as a reminder for myself. Feel free to use this for your project as a starting point.

On the server (example.com)

  1. Create a user on example.com, as which we (the git client) connects (push) to exmaple.com.
sudo useradd -m -s /usr/bin/git-shell git