Skip to content

Instantly share code, notes, and snippets.

View phantomk's full-sized avatar
🎯
Focusing

0xbc phantomk

🎯
Focusing
View GitHub Profile
@aifeiasdf
aifeiasdf / benchmark
Last active October 20, 2023 02:09
benchmark-apisix with envoy
对比 Apache APISIX 和 envoy 的一些性能参数:网关延迟、QPS 和是否线性扩展
系统环境:微软云 Linux (ubuntu 18.04), Standard D13 v2 (8 vcpus, 56 GiB memory)
压力测试客户端:wrk
Apache apisix benchmark script: https://github.com/iresty/apisix/blob/master/benchmark/run.sh
Kong beanchmark script:
curl -i -X POST \
--url http://localhost:8001/services/ \
--data 'name=example-service' \
--data 'host=127.0.0.1'
curl -i -X POST \
@dsandip
dsandip / allow-list.graphql
Last active January 18, 2025 19:16
Sample file with queries and mutations that can be used to populate an allow-list
# will be ignored by the allow-list
type Starship {
id: ID!
name: String!
length(unit: LengthUnit = METER): Float
}
# will be ignored by the allow-list
scalar parsec
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active April 9, 2025 13:42
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@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

@fgilio
fgilio / axios-catch-error.js
Last active February 27, 2025 05:50
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active April 7, 2025 01:38 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

anonymous
anonymous / PKGBUILD Webstorm 10.0.3
Created May 23, 2015 23:15
PKGBUILD for AUR Archlinux package.
pkgname=webstorm
_pkgname=WebStorm
pkgver=10.0.3
_pkgver=141.1237
pkgrel=1
pkgdesc="JavaScript IDE and HTML editor."
arch=('i686' 'x86_64')
options=('!strip')
url="http://www.jetbrains.com/${pkgname}"
license=('custom')
<?xml version="1.0" encoding="UTF-8" ?>
<opml version="1.0">
<head>
<title>寸志 subscriptions in Digg Reader</title>
</head>
<body>
<outline text="Framer Blog" title="Framer Blog" type="rss" xmlUrl="http://framerjs.tumblr.com/rss" htmlUrl="http://framerjs.tumblr.com/" />
<outline text="粉丝日志" title="粉丝日志" type="rss" xmlUrl="http://blog.fens.me/feed/" htmlUrl="http://blog.fens.me" />
<outline text="AngularJS" title="AngularJS" type="rss" xmlUrl="http://blog.angularjs.org/feeds/posts/default" htmlUrl="http://blog.angularjs.org/" />
<outline text="blog.izs.me" title="blog.izs.me" type="rss" xmlUrl="http://blog.izs.me/rss" htmlUrl="http://blog.izs.me/" />
@caok
caok / gist:8877936
Created February 8, 2014 07:22
如何在Node.js中获取本机IP地址
//获取本地IP地址
var os = require('os');
var IPv4,hostName;
hostName=os.hostname();
for(var i=0;i<os.networkInterfaces().eth0.length;i++){
if(os.networkInterfaces().eth0[i].family=='IPv4'){
IPv4=os.networkInterfaces().eth0[i].address;
}
}
console.log('----------local IP: '+IPv4);