Skip to content

Instantly share code, notes, and snippets.

@tbutts
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@kevinelliott
kevinelliott / 1-macOS-10.13-high-sierra-setup.md
Last active September 21, 2023 11:57
macOS 10.13 High Sierra Mostly-Automated Setup

macOS 10.13 High Sierra Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.13 High Siera, in flavor of my previous macOS/OSX setup gists:

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

@philcryer
philcryer / lynis_autorunner.sh
Last active September 15, 2019 04:23
Download and run a Lynis audit scan on your system with this shell script.
#!/bin/sh
# This script will automatically:
# * download [Lynis](https://cisofy.com/lynis/), an open source security auditing tool
# * run a full audit check, either privileged, or non-privileged if not logged in as root
# * cleanup by removing the downloaded archive, and the extracted directory it ran out of
# * save the audit report to your local directory (YYYYMMDD-lynis-report)
#
# This script requires:
# * awk
@ruda
ruda / listchars.vim
Last active March 5, 2024 09:00
Vim: listchars samples
set listchars=tab:→\ ,trail:␣,extends:…,eol:⏎
set listchars=tab:→\ ,trail:␣,precedes:«,extends:»,eol:⏎
set listchars=tab:→\ ,trail:·,precedes:«,extends:»,eol:¶
set listchars=tab:‣\ ,trail:·,precedes:«,extends:»,eol:¬
set listchars=tab:␋\ ,trail:␠,precedes:«,extends:»,eol:␤
set listchars=tab:>-,trail:.,precedes:<,extends:>,eol:$
@phalt
phalt / main.go
Created December 3, 2014 14:51
Simple HTTP API in Go
package main
import (
"github.com/gin-gonic/gin"
"database/sql"
"github.com/coopernurse/gorp"
_ "github.com/mattn/go-sqlite3"
"log"
"time"
"strconv"
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@yamaya
yamaya / xcode-clang-vers
Last active April 3, 2024 02:28
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
@nickfloyd
nickfloyd / create_branch_from_tag
Created January 27, 2011 05:38
To create a branch from a tag
-Go to the starting point of the project
>> git checkout origin master
-fetch all objects
>> git fetch origin
-Make the branch from the tag
>> git branch new_branch tag_name
-Checkout the branch
>> git checkout new_branch
-Push the branch up
>> git push origin new_branch