Skip to content

Instantly share code, notes, and snippets.

Chad Sharp crossroads1112

Block or report user

Report or block crossroads1112

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
import os
import sys
from flask import Flask, redirect, render_template, request, url_for
import helpers
from analyzer import Analyzer
app = Flask(__name__)
@app.route( "/" )
def index():
return render_template( "index.html" )
crossroads1112 / cs50-hardened.c
Last active Feb 20, 2017
My (hopefully) improved version of the cs50 library. It checks for overflow, prevents a possible segfault and allows for larger input
View cs50-hardened.c
* CS50 Library 6
* Based on Eric Roberts' genlib.c and simpio.c.
* Copyright (c) 2013,
* Glenn Holloway <>
* David J. Malan <>
* All rights reserved.
crossroads1112 / snp
Last active Aug 29, 2015 — forked from erikw/snp
View snp
#!/usr/bin/env bash
# Runs a command wrapped with btrfs pre-post snapshots.
date=$(date "+%Y-%m-%d-%H%M%S")
if (( EUID != 0 )); then
echo "This script must be run as root" 1>&2
exit 1
crossroads1112 /
Last active Feb 13, 2018
In case of reinstall, this script puts all of my dotfiles where they should be, sets up mpd and gives me the option of installing all of my previous packages from the official repos and from the AUR (requires my pkgdump script)
#!/usr/bin/env bash
dir=~/.dotfiles # dotfiles directory
olddir=~/.dotfiles_old # old dotfiles backup directory
files="zshrc vimrc tmux.conf vimperatorrc" # list of files/folders to symlink in homedir
# create dotfiles_old in homedir
echo -n "Creating $olddir for backup of any existing dotfiles in ~ ..."
mkdir -p $olddir

Keybase proof

I hereby claim:

  • I am crossroads1112 on github.
  • I am crossroads1112 ( on keybase.
  • I have a public key whose fingerprint is 9C2D 06BC F805 3215 5ECD 7BE4 74A1 B23F 108D 84DC

To claim this, I am signing this object:

crossroads1112 / !!
Last active Nov 26, 2019
Repeat most recent command in fish
View !!
# Add this to your ~/.config/fish/
# Syntax:
# To just rerun your last command, simply type '!!'
# '!! sudo' will prepend sudo to your most recent command
# Running !! with anything other than sudo will append the argument to your most recent command
# To add another command to prepend list remove the # on line 10 and put the command in the quotes. Repeat as needed
function !!;
set prevcmd (history | head -n 1)
if test "$argv"
if test "$argv" = "sudo" #; or "any other command you want to prepend"
crossroads1112 / rollback
Last active Aug 29, 2015
Script that makes it easy to rollback snapshots with snapper
View rollback
#!/usr/bin/env bash
date=$(date "+%Y-%m-%d-%H%M%S")
#If log directory doesnt exist, make it
if [ ! -d "$log_path" ]; then
mkdir $log_path
You can’t perform that action at this time.