Skip to content

Instantly share code, notes, and snippets.

@caseywatts
caseywatts / 0-self-publishing.md
Last active October 5, 2024 11:27
Self-Publishing via Markdown
@fnky
fnky / ANSI.md
Last active November 16, 2024 18:30
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active November 16, 2024 15:08 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@kemingy
kemingy / auto_deploy_blog.md
Created August 6, 2018 11:41
Auto deploy blog generated by jekyll with jekyll-archives

Auto-Deploying Blogs to GitHub Pages with Travis CI

GitHub Pages doesn't support jekyll-archives now PR. We can use Travis CI to build it and push to gh-pages branch.

There is already some gists talks about this topic using bash. However, Travis now support deploy in .travis.yml , which is super easy to set up. (Deploying to GitHub Pages is experimental now [2018.07.25])

Create .travis.yml File

Here is an example.

@tienthanh2509
tienthanh2509 / install-openvpn-24.sh
Last active September 3, 2024 09:16
Install OpenVPN 2.4.x on Ubuntu 16.04 Xenial
curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt update
apt install -y openvpn
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@juanibrex
juanibrex / Pencil Project Hotkeys
Last active August 17, 2020 14:34
Pencil Project Shortcuts
# Pencil Project Shortcuts
## General Shortcuts
+ New Document: Ctrl + n
+ Open: Ctrl + o
+ Save: Ctrl + s
+ Save as: Ctrl + Shift + s
+ Export: Ctrl + Shift + e
+ Print: Ctrl + p

Scaling your API with rate limiters

The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.

In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.

Request rate limiter

This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.

@sahilsk
sahilsk / kafka-rebalancing.md
Last active March 11, 2023 12:41
Kafka-rebalancing

Lets say i want to rebalance my-sample-topic topic on my kafka cluster

Create topcis.json

{
  "version": 1,
  "topics": [
 { "topic": "my-sample-topic"