Skip to content

Instantly share code, notes, and snippets.

View nhooyr's full-sized avatar

Quinn Rivenwell nhooyr

View GitHub Profile
colorscheme apprentice
highlight Type ctermfg=103
highlight cssClassName ctermfg=6
highlight cssClassNameDot ctermfg=6
highlight link jsFuncCall Type
highlight cssBraces ctermfg=fg
highlight htmlLink ctermfg=fg
highlight Function ctermfg=182
highlight MatchParen ctermfg=182 ctermbg=232
highlight Constant ctermfg=210
type interceptResponseWriter struct {
http.ResponseWriter
errH func(http.ResponseWriter, int)
}
func (w *interceptResponseWriter) WriteHeader(status int) {
if status >= http.StatusBadRequest {
w.errH(w.ResponseWriter, status)
w.errH = nil
} else {
package main
import (
"log"
"net/http"
)
func main() {
fs := interceptHandler(http.FileServer(http.Dir(".")), defaultErrorHandler)
log.Fatal(http.ListenAndServe(":80", fs))
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
int writeString(const char *data) {
@autoreleasepool {
[[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSPasteboardTypeString] owner:nil];
Hi Anmol,
I am Reihaneh. I found your contact information on GitHub. I am contacting you because of your very high contribution on GitHub... 2523 contributions…
I am doing my PhD at Queensland University of Technology, Australia. I am doing research on user engagement on co-creation networks such as GitHub. For the purpose of my research, I need to interview people who are actively using GitHub. Would you be interested in undertaking an interview over Skype about your contribution on GitHub? You can read more in the attached ethics form. Please contact me if you are keen.
This study has been approved by the QUT Human Research Ethics Committee (approval number 1500000502).
Many thanks for your consideration of this request.
Kind regards,

edit: We're always hiring solid engineers so feel free to reach out even once this post is old.

I'm a senior engineer at https://coder.com.

We're a small startup in Austin, TX looking to scale our Go team with solid engineers. The positions involve developing and maintaining the Go microservices that serve our development platform on kubernetes. There are more details on precisely what the company does on the site.

We want someone by our downtown Austin office but are open to remote for the first few months until we can get you relocated. If you’re really good, full time remote is also possible. US & Canada preferred.

We are big on open source. Check out some of our projects at https://github.com/cdr or mine at https://github.com/nhooyr.

package main
import (
"flag"
"net"
"net/url"
"os/exec"
"sync"
"time"
func (b *backend) handle(c1 *tls.Conn, c *net.TCPConn) {
c2, err := net.DialTCP("tcp", nil, b.addr)
if err != nil {
c1.Close()
return
}
go func() {
err := io.Copy(c2, c1)
if err != nil {
log.Print(err)
Shape intersection = Shape.intersect(shape1, shape2);
return intersection.getBoundsInLocal().getWidth() > 0;
import javafx.application.Application;
import javafx.geometry.Bounds;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;