Skip to content

Instantly share code, notes, and snippets.

@NatWeiss
NatWeiss / .nanorc
Created October 24, 2013 06:35
A .nanorc file which automatically colors source code, scripts, diffs, etc.
#
# .nanorc
# colors: white, black, red, blue, green, yellow, magenta, cyan.
#
set autoindent
set historylog
set nohelp
set nowrap
set smooth
set tabsize 5
@NatWeiss
NatWeiss / .bashrc
Created October 24, 2013 07:41
A Debian .bashrc file with custom coloring.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@NatWeiss
NatWeiss / .profile
Last active December 30, 2015 05:29
An OS X profile.
export PS1='\[\033[1;33m\]$PWD\n*\[\033[0;38m\] '
export EDITOR=/usr/bin/nano
export HISTSIZE=10485760
export HISTFILESIZE=10485760
# ls in color
export CLICOLOR=1
export LSCOLORS=CxFxCxDxBxegedabagacad
# make clean tarballs w/o ._* files
export COPYFILE_DISABLE=true
@NatWeiss
NatWeiss / Default Dark.dvtcolortheme
Last active December 9, 2015 03:58
Xcode Default Dark Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
@NatWeiss
NatWeiss / .vimrc
Last active August 12, 2022 22:39
syntax enable
colorscheme xcode-dark
" attempt to fix issue
" :95;0c is already typed on starting vim (not nvim)
set t_u7=
set t_SH=
" no need to press shift to enter command mode
noremap ; :
@NatWeiss
NatWeiss / makefile
Last active December 23, 2019 17:26
Linux setup makefile
user:
# setup .inputrc for faster tab completion
echo "set completion-ignore-case on" > ~/.inputrc
# create aliases
rm -f .bash_aliases
wget https://gist.githubusercontent.com/NatWeiss/ed2129061935fea0ee004cd360c0b708/raw/.bash_aliases
# update packages
sudo apt-get update --allow-releaseinfo-change
sudo apt-get dist-upgrade --fix-missing
sudo apt-get autoremove
cmake_policy(SET CMP0017 NEW)
cmake_minimum_required(VERSION 2.8)
if (POLICY CMP0058)
# Ninja requires custom command byproducts to be explicit
cmake_policy(SET CMP0058 NEW)
endif()
#
# First set project name so cmake variables get set
#message(STATUS "SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
#message(STATUS "COMPILER: ${CMAKE_CXX_COMPILER_ID}")
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(WINRT)
set(SYSTEM_STRING "Windows RT")
elseif(WP8)
set(SYSTEM_STRING "Windows Phone 8")
else()
@NatWeiss
NatWeiss / xcode-dark.vim
Last active November 3, 2017 18:25
Vim color theme that looks like Xcode's default but with a dark background
" Vim color file
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "Xcode Dark"
@NatWeiss
NatWeiss / .bash_aliases
Last active July 17, 2019 03:07
Bash aliases
alias off="(sleep 1 && sudo shutdown now &) && exit"
v() {
if [[ ! -z $(jobs) ]]; then
#echo 'has jobs'
fg
else
#echo 'no jobs'
command vim "$@"
fi