Skip to content

Instantly share code, notes, and snippets.

Errmojis

Users have a hard time dealing with errors.

To solve that, put these emojis prominently in your error messages. Then when the user says:

I dont know what happened but I saw a christmas tree and then everything stopped working

You'll know it was an internal error!

@solso
solso / human-web-overview.md
Last active December 6, 2019 12:36
Human Web Overview

Human Web Overview

Konark Modi, Alex Catarineu, Philipp Claßen and Josep M. Pujol at Cliqz *München, October 2016

[edited on October 2017]*

[edited on September 2019 to fix broken links and add reference to HPN paper]*

We recommend to read the article on Cliqz Tech blog, the content is more up to date there. Not removing this gist for historical reasons. December 2019.

@ngm
ngm / packages.el
Last active November 13, 2019 21:44
Basic spacemacs org-brain layer
;; put this file in ~/.emacs.d/private/org-brain
;; then add org-brain into your dotspacemacs-configuration-layers in .spacemacs
(defconst org-brain-packages
'(org-brain)
)
;; see https://github.com/Kungsgeten/org-brain#setup-and-requirements
(defun org-brain/init-org-brain ()
(use-package org-brain
@mmellison
mmellison / grpc_asyncio.py
Last active April 3, 2024 15:48
gRPC Servicer with Asyncio (Python 3.6+)
import asyncio
from concurrent import futures
import functools
import inspect
import threading
from grpc import _server
def _loop_mgr(loop: asyncio.AbstractEventLoop):
@jvehent
jvehent / make_nat_instance.sh
Last active May 15, 2017 03:53
Create a NAT instance in a VPC and route all traffic to it
#!/usr/bin/env bash
# configuration
VPC=vpc-24e97b4d
IGW=igw-9f59e9f6
MAINRT=rtb-ae92f4c7
REGION=us-east-2
SSHKEY=jvehent-cloudservicesawsdev-us-east-2-20170513
fail() {
@reborg
reborg / rich-already-answered-that.md
Last active February 23, 2024 13:09
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@bookshelfdave
bookshelfdave / instance_types.dat
Created February 28, 2017 19:53
EC2 instance types
ap-northeast-1;ap-northeast-1a;c1.medium
ap-northeast-1;ap-northeast-1a;c1.xlarge
ap-northeast-1;ap-northeast-1a;c3.2xlarge
ap-northeast-1;ap-northeast-1a;c3.4xlarge
ap-northeast-1;ap-northeast-1a;c3.8xlarge
ap-northeast-1;ap-northeast-1a;c3.large
ap-northeast-1;ap-northeast-1a;c3.xlarge
ap-northeast-1;ap-northeast-1a;c4.2xlarge
ap-northeast-1;ap-northeast-1a;c4.4xlarge
ap-northeast-1;ap-northeast-1a;c4.8xlarge
@dusenberrymw
dusenberrymw / spark_tips_and_tricks.md
Last active February 8, 2023 05:11
Tips and tricks for Apache Spark.

Spark Tips & Tricks

Misc. Tips & Tricks

  • If values are integers in [0, 255], Parquet will automatically compress to use 1 byte unsigned integers, thus decreasing the size of saved DataFrame by a factor of 8.
  • Partition DataFrames to have evenly-distributed, ~128MB partition sizes (empirical finding). Always err on the higher side w.r.t. number of partitions.
  • Pay particular attention to the number of partitions when using flatMap, especially if the following operation will result in high memory usage. The flatMap op usually results in a DataFrame with a [much] larger number of rows, yet the number of partitions will remain the same. Thus, if a subsequent op causes a large expansion of memory usage (i.e. converting a DataFrame of indices to a DataFrame of large Vectors), the memory usage per partition may become too high. In this case, it is beneficial to repartition the output of flatMap to a number of partitions that will safely allow for appropriate partition memory sizes, based upon the
@MrHohn
MrHohn / dns-horizontal-autoscaling.md
Last active October 23, 2019 09:43
Using DNS Horizontal Autoscaling feature in Kuberentes.