Skip to content

Instantly share code, notes, and snippets.

View darthlukan's full-sized avatar
:shipit:
Working from home

Brian Tomlinson darthlukan

:shipit:
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@darthlukan
darthlukan / Deadisland.md
Last active August 29, 2015 14:17
Get games to work on non-ext4 partitions with an ext4 image, adapted from http://steamcommunity.com/app/91310/discussions/0/604941528485548722/#c611701360830278531

Switch to your steam common dir

cd ~/.local/share/Steam/SteamApps/common

Create an image, and format it as ext4

dd bs=1M count={number of blocks for desired size} if=/dev/zero of="{gamename}.img"
mkfs.ext4 {gamename}.img

Move the original directory out of the way, and create a mount pont

@darthlukan
darthlukan / never.py
Created January 23, 2015 13:52
Never gonna give you up...
def only():
while True:
tell_about_feels()
# Never gonna...
give_you_up()
let_you_down()
run_around(desert_you())
make_you_cry()
say_goodbye()
    npm install -g asbjornenge/thinking-in-react
     
    > contextify@0.1.8 install /usr/lib/node_modules/thinking-in-react/node_modules/jsdom/node_modules/contextify
    > node-gyp rebuild
    
    gyp ERR! configure error 
    gyp ERR! stack Error: Python executable "python" is v3.4.1, which is not supported by gyp.
    gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
    gyp ERR! stack     at failPythonVersion (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:108:14)
@darthlukan
darthlukan / haversine.py
Created August 4, 2014 12:01
Haversine formula for getting the distance between two points given latitudes and longitudes (formats {lat: float, lon: float}).
from math import radians, cos, sin, asin, sqrt
def haversine(alat, alon, blat, blon):
R = 6371 # Earth's radius in KM
alat, alon, blat, blon = map(radians, [alat, alon, blat, blon])
clon = blon - alon
clat = blat - alat
" .vimrc
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details
" For multi-byte character support (CJK support, for example):
"set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
set shell=/usr/bin/zsh
" Begin vundle setup
set nocompatible
Gazelle Professional Configuration
Base System $879.00
Ubuntu 12.10 64 bit
5 Free GB of Ubuntu One Online Storage and Sync
15.6" 1080p Full High Definition LED Backlit Display with Glossy Surface ( 1920 x 1080 )
Intel HD Graphics 4000
3rd Generation Intel Core i7-3630QM Processor ( 2.40GHz 6MB L3 Cache - 4 Cores plus Hyperthreading )
4 GB DDR3 SDRAM at 1600MHz - 1 X 4 GB
500 GB 7200 RPM SATA II
United States Keyboard Layout

Keybase proof

I hereby claim:

  • I am darthlukan on github.
  • I am briantomlinson (https://keybase.io/briantomlinson) on keybase.
  • I have a public key whose fingerprint is 2BDB A01B 6DC1 83E6 C226 7A98 2B4E C757 3694 569D

To claim this, I am signing this object:

@darthlukan
darthlukan / Dockerfile
Last active August 18, 2019 06:25
Arch base-devel + Go + Go ENV vars set
FROM base/devel:minimal
MAINTAINER Brian Tomlinson <brian.tomlinson@linux.com>
ADD mirrorlist /etc/pacman.d/mirrorlist
RUN pacman-key --init && pacman-key --populate archlinux
RUN pacman -Syyuu --noconfirm
RUN pacman -S --noconfirm git rsync subversion mercurial go vim htop; rm /var/cache/pacman/pkg/*
ENV GOROOT /usr/lib/go
ENV GOPATH $HOME/go
RUN mkdir -p $HOME/go/src $HOME/go/pkg $HOME/go/bin $HOME/bin
@darthlukan
darthlukan / slices.go
Last active December 29, 2015 03:18
I expect slice capacity to remain at 20, but here it extends to 40 automagically. That's cool and all, but how did it do that and why double rather than just extend capacity to the limit? Is there some syntax that I'm not understanding?
// slice.go
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello World!")