Skip to content

Instantly share code, notes, and snippets.

View vito's full-sized avatar

Alex Suraci vito

View GitHub Profile
SIGQUIT: quit
PC=0x69c73 m=2
goroutine 0 [idle]:
runtime.mach_semaphore_timedwait(0x3c00002503, 0x0, 0xb0080d2c, 0x3c, 0x2503, 0xc820000900, 0x5d3f9, 0xdf8475800, 0x0, 0xb0080d74, ...)
/usr/local/Cellar/go/1.6/libexec/src/runtime/sys_darwin_amd64.s:421 +0x13
runtime.semasleep1(0xdf8475800, 0x0)
/usr/local/Cellar/go/1.6/libexec/src/runtime/os1_darwin.go:412 +0x7e
runtime.semasleep.func1()
/usr/local/Cellar/go/1.6/libexec/src/runtime/os1_darwin.go:439 +0x29
allocations.pivotallabs.com
bosh.io
ci.concourse.ci
digitalocean.com
elm-lang.org
facebook.com
github.com/concourse/atc
hub.docker.com
imgur.com
jetway.pivotal.io
@vito
vito / sshttp.go
Created March 28, 2015 22:17
golang ssh+http listener
package main
import (
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"syscall"

Keybase proof

I hereby claim:

  • I am vito on github.
  • I am alexsuraci (https://keybase.io/alexsuraci) on keybase.
  • I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }

To claim this, I am signing this object:

/*
* CVE-2014-0196: Linux kernel <= v3.15-rc4: raw mode PTY local echo race
* condition
*
* Slightly-less-than-POC privilege escalation exploit
* For kernels >= v3.14-rc1
*
* Matthew Daley <[email protected]>
*
* Usage:
@vito
vito / go-fmt.vim
Last active December 21, 2015 06:18
automatic go fmt that preserves the user's "undo" (based on http://golang.org/misc/vim/ftplugin/go/fmt.vim)
function! s:GoFormatKeepingUndo()
let view = winsaveview()
silent! undojoin | silent %!gofmt
if v:shell_error
let errors = []
for line in getline(1, line('$'))
let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)')
if !empty(tokens)
call add(errors, {"filename": @%,
\"lnum": tokens[2],
@vito
vito / gist:5298326
Created April 3, 2013 03:53
atomy macro bootstrapping
-- TODO: define 'nil'
-- TODO: define quasiquote code, use for the macro macro
-- TODO: make quasiquote in macro pattern implicit (e.g. macro(~a + ~b): '2)
define-method(
'define-macro
'define-method('expand, body, '_, pattern)
'_
'pattern
'body)
@vito
vito / manifest.yml
Created May 15, 2012 21:34
minecraft as a service
---
applications:
.:
name: minecraft
framework:
name: standalone
info:
mem: 64M
description: Standalone Application
exec:
$ ri add_runtime_dependency
Nothing known about .add_runtime_dependency
$ rbenv shell 1.9.2-p290
$ ri add_runtime_dependency
.add_runtime_dependency
(from gem rubygems-1.8.10)
Implementation from Gem::Specification
------------------------------------------------------------------------------
add_runtime_dependency(gem, *requirements)
@vito
vito / conclusions?
Created March 4, 2011 19:25
quanto method style guidelines
if you have to write a unary method to accompany a keyword method
(e.g. for sending no args), just define the unary method
if you're going to use multiple blocks, use keyword
if a block value is likely to be used, consider using unary postfix or
keyword (not a huge deal though, given that & is pretty easy)
unary prefix can be better for DSLs, as it immediately shows the purpose
of the block rather than tacking it on the end