Skip to content

Instantly share code, notes, and snippets.

View hallfox's full-sized avatar

Taylor Foxhall hallfox

  • Bloomberg LP
View GitHub Profile
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" ================ General Config ====================
set showcmd "Show incomplete cmds down the bottom
set showmode "Show current mode down the bottom
set visualbell "No sounds
set autoread "Reload files changed outside vim
public class BadIdea {
private static int myShittyGlobalVar = 0;
public static void badIdea() {
try {
badIdea();
}
catch (StackOverflowError e) {
System.out.println("Stack overflow!");
System.gc();
@hallfox
hallfox / westwood.zsh-theme
Last active March 17, 2016 17:24
It's the eastwood theme but without the ruby version to the right
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
local cb=$(git_current_branch)
if [ -n "$cb" ]; then
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
@hallfox
hallfox / claim_ebook.py
Created November 11, 2015 03:36
Script to claim free ebook of the day
import requests
import re
import os.path
import getpass
import time
import datetime
# Configure save path here
savePath = "/home/" + getpass.getuser() + "/Desktop/"
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
set nocompatible " Relinquish vi support
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
" Plugin 'githubUsername/repoName'
" Let vundle manage itself:
Plugin 'gmarik/vundle'
backports.ssl-match-hostname==3.4.0.2
certifi==14.5.14
ipython==3.1.0
Jinja2==2.7.3
jsonschema==2.4.0
MarkupSafe==0.23
matplotlib==1.4.3
mock==1.0.1
nose==1.3.6
numpy==1.9.2
set nocompatible " Relinquish vi support
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
" Plugin 'githubUsername/repoName'
" Let vundle manage itself:
Plugin 'gmarik/vundle'
CC=#complier
CFLAGS=-c -Wall -g
LDFLAGS=
SOURCES=#source files
OBJECTS=$(SOURCES:.cpp=.o)
TARGET=#build target
all: $(SOURCES) $(TARGET)
$(TARGET): $(OBJECTS)
@hallfox
hallfox / hack5.c
Created July 31, 2014 02:30
It's easier to do in C.
#include <stdio.h>
int main()
{
int x;
printf("Enter a number: ");
scanf("%d", &x);
printf("You input: %d", x);