Skip to content

Instantly share code, notes, and snippets.

View lagsalot's full-sized avatar

Brandt Lofton lagsalot

View GitHub Profile
@lagsalot
lagsalot / pie.coffee
Last active August 29, 2015 14:06 — forked from TheJKFever/pie.coffee
class Dashing.Pie extends Dashing.Widget
@accessor 'value', Dashing.AnimatedValue
onData: (data) ->
width = 220
height = 220
radius = 110
color = d3.scale.category20()
$(@node).find('.pie_chart svg').remove();
@lagsalot
lagsalot / pie.coffee
Last active August 29, 2015 14:06 — forked from stevenleeg/pie.coffee
class Dashing.Pie extends Dashing.Widget
@accessor 'value'
onData: (data) ->
@render(data.value)
render: (data) ->
if(!data)
data = @get("value")
if(!data)
@lagsalot
lagsalot / README.md
Created December 24, 2013 06:34 — forked from isa/README.md

RHEL 6.3 veewee templates for vagrant use

These templates can be used to feed to veewee to spin up an el6 basebox for use with vagrant.

There are some coded values in definition.rb and ks.cfg which point at Yale-ishness. Amend to point at local RHEL iso/yum repo.

Built successfully with veewee 0.2.3, vagrant 1.0.3, Virtualbox 4.1.18.

Config Management

@lagsalot
lagsalot / free-memory.rb
Last active December 21, 2015 15:58 — forked from vigo/free-memory.rb
#!/usr/bin/env ruby
# encoding: utf-8
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel
# http://vigodome.com | http://ugur.ozyilmazel.com | https://github.com/vigo
def get_paged_memory_usage(match_string, paging=4096)
mvar = 3
if match_string.split(/[^\w]/).length > 1
mvar = 4
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
# reload config file
bind r source-file ~/.tmux.conf \; display-message "source config done"
bind t run-shell '~/bin/notes'
bind [ copy-mode
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy V rectangle-toggle
bind ] paste-buffer
# use the vim resize keys.
bind -r - resize-pane -D 10
@lagsalot
lagsalot / color-magic
Created December 3, 2012 16:27
color magic
alias list_colors='for i in $(seq 0 10 256); do for j in $(seq 0 1 9); do n=$(expr $i + $j); [ $n -gt 256 ] && break || echo -ne "\t\033[38;5;${n}m${n}\033[0m"; done; echo; done'
@lagsalot
lagsalot / stats.rb
Created September 16, 2009 15:07 — forked from jasonwatkinspdx/stats.rb
ruby measurement class example
class Measurement
attr_accessor :count, :sum, :sum_squares, :min, :max
def initialize
@count, @sum, @sum_squares, @min, @max = 0, 0, 0, nil, nil
end
def record n
@count += 1
@sum += n