Skip to content

Instantly share code, notes, and snippets.

View mattie47's full-sized avatar

Matt mattie47

View GitHub Profile
@BretStateham
BretStateham / obdii_info.sh
Last active August 22, 2023 04:17
Dump OBDII Info via cansend and candump
# --------- SCRIPT BEGIN ----------
# By Bret Stateham
# This script assumes
# - You are running on a linux machine
# - You have the can-utils installed and working. See:
# - https://github.com/linux-can/can-utils
# - https://www.kernel.org/doc/Documentation/networking/can.txt
# - You have a can device attached and configured as can0 (you can change the targetbus variable to match if otherwise)
# - The can device is attached to your running target vehicle
@subfuzion
subfuzion / vi-keys.md
Created February 26, 2014 19:06
VI keys

Just a quick and dirty memory aid for common things.

Undo, Redo, and Repeat

Action Keys
Undo u or :u
Undo all changes to line U
Redo undone change Ctrl-R or :red[o]
Repeat last command .
@gregbuehler
gregbuehler / gitlab.conf
Created December 27, 2013 23:23
nginx config for gitlab
upstream gitlab {
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}
# This is a normal HTTP host which redirects all traffic to the HTTPS host.
# Replace git.example.com with your FQDN.
server {
listen *:80;
server_name gitlab.example.com gitlab;
server_tokens off;
@cliss
cliss / organize-photos.py
Created October 6, 2013 14:43
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################
@tsolar
tsolar / phpmyadmin
Created September 3, 2013 21:00
phpmyadmin nginx config
server {
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;