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
mitchelloharawild / twitter_list_members.R
Last active Mar 6, 2019
Code for obtaining a list of members from twitter
View twitter_list_members.R
library(httr)
library(purrr)
token <- rtweet:::check_token(NULL)
dsw <- GET(url = "https://api.twitter.com/1.1/lists/members.json?slug=women-in-data-science&owner_screen_name=becomingdatasci&cursor=-1&count=5000&skip_status=1", token)
map_chr(content(dsw)$users, "screen_name") %>% sort %>% cat(sep = "\n")
#> ___dhara___
#> __Helma
#> _ajbc
#> _beenkim
#> _ehinosa
@enricofoltran
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 (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@mdesantis
mdesantis / upgrade-postgres-9.6-to-10.md
Last active Sep 20, 2019 — forked from delameko/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.6 to 10 on Ubuntu 16.04
View upgrade-postgres-9.6-to-10.md

TL;DR

Install Postgres 10, and then:

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

INTRO

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: https://talks.golang.org/2012/waza.slide#1 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:

Goroutines

View react_samples_list.md
@jonhoo
jonhoo / README.md
Last active Oct 22, 2018
Distributed RWMutex in Go
View README.md
@acolyer
acolyer / service-checklist.md
Last active Sep 27, 2019
Internet Scale Services Checklist
View service-checklist.md

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
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 http://archive.ubuntu.com/ubuntu 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
View adams-heroku-values.md

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
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.