Skip to content

Instantly share code, notes, and snippets.

View nfarrar's full-sized avatar

Nathan Farrar nfarrar

View GitHub Profile
@nfarrar
nfarrar / gitio
Created September 12, 2015 19:19
bash script for shortening urls with git.io
#!/usr/bin/env bash
# Author: Nathan Farrar <nfarrar@crunk.io>
# Website: https://crunk.io
# Description: Command-line git.io shortner script, in bash.
#
#/ Usage: gitio [options] <url>
#/ Shortens github URLs using git.io. The generated URL is automatically
#/ copied to the clipboard (requires xclip on linux platforms).
#/ -c <code> Specify an optional code to be used as a 'vanity' URL.
#/ -v Display verbose messages.
@nfarrar
nfarrar / heygirl.bash
Last active August 29, 2015 14:19
WIP: Configuration mangement ... in bash.
#!/usr/bin/env bash
# Author: Nathan Farrar <nfarrar@crunk.io>
# Website: http://dotfiles.crunk.io/
#
#/ Usage: source _lib.bash
#/ bash _lib.bash
#/
#/ This script is required by all the other scripts in bootstrap & modules
#/ directories. It provides a set of reusable 'library' functions for building
#/ small, cross-platform scripts (bundled as modules) that install & configure
@nfarrar
nfarrar / colorlogger.py
Last active April 13, 2023 06:22
Python Colored Logging
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Nathan Farrar"
__website__ = "http://crunk.io"
__email__ = "nfarrar@crunk.io"
__version__ = 0.1
import logging
import sys

Keybase proof

I hereby claim:

  • I am nfarrar on github.
  • I am nfarrar (https://keybase.io/nfarrar) on keybase.
  • I have a public key whose fingerprint is B743 226C 28B5 6031 FD0D DCB5 3E15 F07F C918 704E

To claim this, I am signing this object:

@nfarrar
nfarrar / main.less
Created February 10, 2015 15:13
Playing with Less
// jellybeans
@opacity: 1;
@black-jellybeans: rgba(59,59,59,@opacity); // #3b3b3b
@red-jellybeans: rgb(207,106,76,@opacity); // #cf6a4c
@green-jellybeans: rgba(153,173,106,@opacity); // #99ad6a
@yellow-jellybeans: rgba(216,173,76,@opacity); // #d8ad4c
@blue-jellybeans: rgba(89,123,197,@opacity); // #597bc5
@magenta-jellybeans: rgba(160,55,176,@opacity); // #a037b0
"=============================================================================
" FILE: vimrc
" AUTHOR: Nathan Farrar <nathan.farrar.@gmail.com>
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
" 'Software'), to deal in the Software without restriction, including
" without limitation the rights to use, copy, modify, merge, publish,
" distribute, sublicense, and/or sell copies of the Software, and to
" permit persons to whom the Software is furnished to do so, subject to
# Author: Nathan Farrar
# Email: nathan.farrar@gmail.com
# Website: http://crunk.io/
# Updated: 2014-10-10 08:50:00
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
# NOTES
@nfarrar
nfarrar / woodworking.md
Last active May 14, 2018 01:13
Woodworking & Microshop Design

Woodworking

I'm completely new to home ownership & woodworking. I've tried to tackle a few projects myself & bought a couple tools in the process, but mostly still have no idea what I'm doing. My garage is a currently a complete mess. I've put some stuff up on the walls to make more space and start organizing, but I don't have any decent shelves and the "workbench" is currently just a storage area (leaving me no place to work). The surface of the workbench is warped and there are no vices or clamps making it a less than ideal work surface anyway.

I've started doing some research and dumping the notes here as I (very slowly) make progress.

Contents

@nfarrar
nfarrar / science-for-children.md
Last active August 29, 2015 14:10
... teaching my daughter about science, electronics, robotics, computers and programming.

Science for Children

Learning with style.

Note: Also using this as gift-tracker idea for family.

Misc

Movies & shows she likes, related to science.

" Author: Nathan Farrar
" Email: nathan.farrar@gmail.com
" Website: http://crunk.io/
" INITIALIZATION {{{1
" This file is utf-8. Ensure we read it correctly.
scriptencoding utf-8
" If we're running vim-tiny or vim-small stop sourcing the vim configuration.
if !1 | finish | endif