Skip to content

Instantly share code, notes, and snippets.

View richo's full-sized avatar

richö butts richo

View GitHub Profile
function! FixWhiteSpaceAndReturn()
if expand('%') == '.git/addp-hunk-edit.diff'
return
endif
normal mz
" Hack for my mail :/
:%s/^-- $/-- MARKER/e
:%s/\s\+$//e
:%s/^-- MARKER$/-- /e
normal `z
#!/usr/bin/env/ruby
magicstring = ARGV[0]
classes = []
ObjectSpace.each_object do |o|
classes << o if o.is_a? Class
end
modules = []
def is_true?(thing)
if thing
true
else
false
end
end
#!/usr/bin/python
import os
import tempfile
fd, name = tempfile.mkstemp()
ret = os.system("$EDITOR '%s'" % (name))
if ret != 0:
raise "Your editor exited non-zero"
(gdb) r foo.rs
Starting program: /home/richo/rustbox/rust/rust-no-debug/powerpc-unknown-linux-gnu/stage2/bin/rustc foo.rs
warning: Could not load shared library symbols for linux-vdso32.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".
[New Thread 0xf7f9f280 (LWP 11308)]
*** Error in `/home/richo/rustbox/rust/rust-no-debug/powerpc-unknown-linux-gnu/stage2/bin/rustc': free(): invalid next size (fast): 0xf7600f00 ***
Program received signal SIGABRT, Aborted.
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
03:2b:6c:4a:74:52:d8:a4:b7:e5:b8:f8:5e:5f:98:54
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert SHA2 Extended Validation Server CA
Validity
Not Before: Dec 22 00:00:00 2014 GMT
Not After : Jan 6 12:00:00 2016 GMT
diff --git a/src/cmd/internal/gc/y.go b/src/cmd/internal/gc/y.go
index c952e65..a6f2dc6 100644
--- a/src/cmd/internal/gc/y.go
+++ b/src/cmd/internal/gc/y.go
@@ -69,10 +69,7 @@ const NotPackage = 57392
const NotParen = 57393
const PreferToRightParen = 57394
-var yyToknames = [...]string{
- "$end",
package main
import (
"fmt"
)
const foo = 1
var bar = "hi"
package main
func <T>Map(c chan *T) []T {
var out []*T
range t := c {
if out == nil {
break
}
out = append(out, t)
}
#!/bin/sh
set -xe
rust_version=$(head -n 1 RELEASES.md | cut -f 2 -d " ")
major=$(echo "$rust_version" | cut -f 1 -d '.')
minor=$(echo "$rust_version" | cut -f 2 -d '.')
patch=$(echo "$rust_version" | cut -f 3 -d '.')
rust_version="${major}.$minor.${patch}"