Skip to content

Instantly share code, notes, and snippets.

Working from home

Lishi He ikbear

Working from home
Block or report user

Report or block ikbear

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mitchelloharawild / twitter_list_members.R
Last active Mar 6, 2019
Code for obtaining a list of members from twitter
View twitter_list_members.R
token <- rtweet:::check_token(NULL)
dsw <- GET(url = "", token)
map_chr(content(dsw)$users, "screen_name") %>% sort %>% cat(sep = "\n")
#> ___dhara___
#> __Helma
#> _ajbc
#> _beenkim
#> _ehinosa
enricofoltran / main.go
Last active Oct 18, 2019
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
mdesantis /
Last active Sep 20, 2019 — forked from delameko/
Upgrading PostgreSQL from 9.6 to 10 on Ubuntu 16.04


Install Postgres 10, and then:

sudo pg_dropcluster 10 main --stop
sudo pg_upgradecluster 9.6 main
sudo pg_dropcluster 9.6 main
rushilgupta /
Last active Oct 11, 2019
Concurrency in golang and a mini Load-balancer


Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".

Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).

Let's dig in:


jonhoo /
Last active Oct 22, 2018
Distributed RWMutex in Go
acolyer /
Last active Sep 27, 2019
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
benschw / Dockerfile
Last active Oct 1, 2018
MySQL Docker Container
View Dockerfile
FROM ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN echo "deb precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install mysql-client mysql-server

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

derekcollison / gist:4227635
Created Dec 6, 2012
Early results from high-performance NATS server
View gist:4227635
I have some early benchmark results for our work on a high performance NATS server in Go.

Quick Summary:
We can process ~2M msgs/sec through the system, and the ingress and egress are fairly well balanced.

The basics of the architecture are intelligent buffering and IO calls, fast hashing algorithms and subject distributor/routing, and a zero-allocation hand-written protocol parser.

In addition, I used quite a bit of inlining to avoid function overhead, no use of defer, and little to no object allocation within the fast path. I will share more details and the code at a future date.
You can’t perform that action at this time.