Skip to content

Instantly share code, notes, and snippets.

View erain's full-sized avatar

Yu YI erain

View GitHub Profile
@ekaschalk
ekaschalk / esh-custom.el
Created June 24, 2017 04:39
Customizing your emacs shell.
(require 'dash)
(require 's)
(defmacro with-face (STR &rest PROPS)
"Return STR propertized with PROPS."
`(propertize ,STR 'face (list ,@PROPS)))
(defmacro esh-section (NAME ICON FORM &rest PROPS)
"Build eshell section NAME with ICON prepended to evaled FORM with PROPS."
`(setq ,NAME
@kachayev
kachayev / concurrency-in-go.md
Last active November 19, 2024 02:40
Channels Are Not Enough or Why Pipelining Is Not That Easy
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@samertm
samertm / .emacs
Last active March 31, 2019 16:21
Tricking Out Emacs for Go
;; from https://www.youtube.com/watch?v=r6j2W5DZRtA
;; get the following packages ("M-x package-list-packages"):
;; go-mode
;; go-eldoc
;; company-mode
;; company-go
;; get the following go programs (run each line in your shell):
;; go get golang.org/x/tools/cmd/godoc
;; go get golang.org/x/tools/cmd/goimports
;; go get github.com/rogpeppe/godef
@staltz
staltz / introrx.md
Last active November 19, 2024 02:40
The introduction to Reactive Programming you've been missing
@am
am / shell
Created January 26, 2014 11:35
Kaleidodcope "xcrun: error: cannot be used within an App Sandbox..."
cd /Applications/Kaleidoscope.app/Contents/Resources/Integration/scripts
./install_git-default
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 18, 2024 11:51
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@Nurdok
Nurdok / python_conversion.md
Last active July 11, 2024 15:00
Python Conversion

Python Number Conversion Chart

From To Expression
@kgriffs
kgriffs / sysctl.conf
Last active September 17, 2024 16:34
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
#
# See also: https://gist.github.com/kgriffs/4027835
#
# Assumes a beefy machine with lots of network bandwidth
@bbeck
bbeck / PersistentEphemeralNode.java
Created October 30, 2012 13:39
Persistent ephemeral node for ZooKeeper
package com.netflix.curator.framework.recipes.nodes;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Throwables;
import com.google.common.util.concurrent.SettableFuture;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.netflix.curator.framework.CuratorFramework;
import com.netflix.curator.framework.api.PathAndBytesable;
import com.netflix.curator.utils.EnsurePath;
import com.netflix.curator.utils.ZKPaths;