Skip to content

Instantly share code, notes, and snippets.

View jsvisa's full-sized avatar
🏠
Working from home

Delweng jsvisa

🏠
Working from home
View GitHub Profile
@muink
muink / Clear-unwanted-URL-on-Chrome-address-bar.md
Created October 28, 2015 07:57
删除Chrome地址栏记录中不需要的网址

删除Chrome地址栏记录中不需要的网址(访问历史)

Chrome的地址栏自动补齐功能提供了非常方便的地址预测功能 浏览器可以通过用户当前输入的字符来与用户的访问历史与书签匹配 然后在下拉栏中为用提供准确的补齐方案排名, 提高用户访问效率

在大部分情况下, 这个功能是非常好用的 但是有时, 出于某些原因, 用户需要移除某个记录(网址无法访问,网址更换域名等) Chrome提供了组合键Shift+Delete来删除地址栏下拉记录中的某个网址

@eliquious
eliquious / README.md
Created January 4, 2016 05:01
Golang OpenPGP examples

Building

go build -o goencrypt main.go

Generating Keys

@MrChrisJ
MrChrisJ / 20170127--Bitfinex_Hacked_Coins.csv
Last active May 15, 2025 04:28
20170127--Bitfinex_Hacked_Coins.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 8 columns, instead of 1 in line 6.
Transaction Hash,Block Height,Date,Receiving address,Peer Cluster,Peer Name,Peer Category,Sent
a6a1c3e02bfe6ba0d49205841a066b7655070cf15d88baf7ff626051cfe39ee4,449876,2017-01-25 03:04:35,1D38A8TJHAQfEGdoirE1WpXPEh7NMNHT5L,1D38A8TJHAQfEGdoirE1WpXPEh7NMNHT5L,,,4.04631276
af16fea36591e43651d0f90c689a191e71f39f139c8c6c76ca6a94de1defbad9,449876,2017-01-25 03:04:35,1nL6u6dyeF5cp2vTvsG2jjfMqxQm1Z3fb,1D38A8TJHAQfEGdoirE1WpXPEh7NMNHT5L,,,4.0455642
443706320e569141074a7ba6d3b488b3142928e386f1d4ca3ad0cbc3ea58eeb6,449876,2017-01-25 03:04:35,1D1LKbyLcWSsayaQwZYpE81Wnguhfgx14i,1D38A8TJHAQfEGdoirE1WpXPEh7NMNHT5L,,,3.99877463
025e804d46520b0350dc5673df47feb2ea6c2690bd21e9e3fccc28e81c4cbfac,449876,2017-01-25 03:04:35,15RDbnXTpUeHqdK8S4CCVeukQseYs6kEBK,1D38A8TJHAQfEGdoirE1WpXPEh7NMNHT5L,,,3.9926336
162dd46b873da7348f9a482063e0a39923b1a43fda29d0f0a374fa0de5407279,449876,2017-01-25 03:04:35,172gmUnva3vF1XsPwjkzJmwD8iFkbiqZse,1D38A8TJHAQfEGdoirE1WpXPEh7NMNHT5L,,,4.07657504
a67bf29545ee84fe3a3ad986a1a8d5d0d6fce54b51eaff5ca58e052eb

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.

From ca8b106738521823707f3567cedb41ca158792a3 Mon Sep 17 00:00:00 2001
From: Alberto Milone <alberto.milone@canonical.com>
Date: Wed, 15 Feb 2017 10:53:42 +0100
Subject: [PATCH 1/1] Add support for Linux 4.10
---
common/inc/nv-mm.h | 9 ++++--
nvidia-drm/nvidia-drm-fence.c | 72 +++++++++++++++++++++++++++++++++++++++++++
nvidia-drm/nvidia-drm-gem.h | 6 ++++
nvidia-drm/nvidia-drm-priv.h | 7 +++++
@cdpath
cdpath / wechat.json
Last active December 11, 2024 02:25
使用 Huginn 实现微信公众号全文 RSS
{
"schema_version": 1,
"name": "WeChat",
"description": "微信公众号全文 RSS",
"source_url": false,
"guid": "dd67102f09869c2228f8ed903a32d063",
"tag_fg_color": "#333333",
"tag_bg_color": "#66ff66",
"icon": "leaf",
"exported_at": "2019-01-12T10:56:41Z",
@wcooley
wcooley / Makefile.dash
Last active August 6, 2021 07:38
Building 3rd Party Sphinx Docs for Dash
# docs/Makefile.dash
include Makefile
PROJECT_NAME = $(shell python ../setup.py --name)
.PHONY: dashdoc
dashdoc:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) -D 'html_theme=epub' $(BUILDDIR)/dashdoc
doc2dash -A -v -n $(PROJECT_NAME) -d $(BUILDDIR)/ -f -I index.html -j $(BUILDDIR)/dashdoc
@echo
@echo "Build finished. The Docset is in $(BUILDDIR)/$(PROJECT_NAME).docset."
@steven2358
steven2358 / ffmpeg.md
Last active February 4, 2026 12:11
FFmpeg cheat sheet
@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active January 23, 2026 14:30
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@Tamal
Tamal / git-ssh-error-fix.sh
Last active January 15, 2026 09:59
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work