Skip to content

Instantly share code, notes, and snippets.

View levicole's full-sized avatar

Levi Cole levicole

  • Kolide
  • Nashville, TN
View GitHub Profile
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
set list " show trailing whiteshace and tabs
command! -bar -range=% Trim :<line1>,<line2>s/\s\+$//e
package main
import (
"time"
"strconv"
"fmt"
)
var NewBase60Vocab [60]string
package controllers
import(
"fmt"
"github.com/levicole/lev.io/models"
"github.com/astaxie/beego"
"database/sql"
_ "github.com/go-sql-driver/mysql"
"github.com/coopernurse/gorp"
)
@levicole
levicole / gist:6191159
Created August 9, 2013 04:16
id3 tags...not very pretty right now...
package main
import(
"os"
"fmt"
"log"
"bufio"
)
func main() {
@levicole
levicole / gist:6166310
Created August 6, 2013 16:51
learning concurrency in GO
package main
import "fmt"
func main() {
channela := make(chan int)
go func() {
for {
number := <- channela
%ol
("A".."Z").each do |letter|
%li= link_to letter, "#"
@levicole
levicole / gist:5031529
Created February 25, 2013 17:29
updates all my vim plugins in my vimbundles directory.
for D in $(find . -mindepth 1 -maxdepth 1 -type d) ; do
pushd .;
cd $D;
git pull;
popd;
done
.colophon .quotes blockquote:before {content: "\201C";}
.colophon .quotes blockquote:after{content:"\201D"}
@levicole
levicole / strstr.rb
Created February 7, 2013 23:41
strstr
def strstr(subject, search)
si = 0
subject.length.times do |i|
if subject[i] == search[si]
if search.length == si + 1
@found_at = i - si
break
end
si += 1
else
@levicole
levicole / test.js
Created January 22, 2013 05:15
just a test...nothing to see...
function test() {
alert("its true")
}