Skip to content

Instantly share code, notes, and snippets.

View Kuri-su's full-sized avatar
❄️
DeepIn && Focus

Kurisu_Amatist Kuri-su

❄️
DeepIn && Focus
View GitHub Profile
@heartnn
heartnn / best.txt
Last active December 15, 2023 02:32
DNS for speedup Nintendo Switch (Chinese User)
112.106.53.22 cache01-kcn.ic
112.106.53.34 cache04-kcn.ic
121.202.130.66 m121-202-130-66.smartone.com
203.225.255.10 whcc.kolon.co.kr
203.225.255.11
211.111.172.71 a01.kuwoo.co.kr
211.111.172.72 a02.kuwoo.co.kr
219.84.192.250 219-84-192-250.STATIC.so-net.net.tw
@ykfq
ykfq / Kubernetes 调度优化--重平衡策略方案整理.md
Created January 29, 2019 06:50
Kubernetes 调度优化--重平衡策略方案整理
<title>Kubernetes 调度优化--重平衡策略方案整理</title>
@huyinjie
huyinjie / gist:f3a9321b4c6924f346be19546c1f0b25
Last active August 16, 2019 09:05
Ubuntu 16.04 官方源(US)
sudo vim /etc/apt/sources.list
------------------------------------------------------------------------------------------------------
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
-------------------------------------------------------------------------------------------------------
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
@quericy
quericy / Laravel_validation.php
Last active July 1, 2019 04:01
Localization Validation Message For Chineses With Laravel 5
<?php
/* Last Update : 20170208 ,Laravel 5.3 */
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
@snakevil
snakevil / docker-and-s6-my-new-favorite-process-supervisor.md
Created September 29, 2016 05:50
【译】Docker 和 S6 ——我的进程管理器新欢
@snakevil
snakevil / docker-and-the-pid-1-zombie-reaping-problem.md
Last active March 21, 2023 12:30
【译】Docker 和子进程“僵尸化”问题

【译】Docker 和子进程“僵尸化”问题

作者 Hongli Lai 看着像是华人,可惜没找到文章的中文版本,于是就很土鳖地手翻了一遍。文章的措辞很口语化,因此意译为主。点击这里可以阅读原文。


在构建 Docker 容器时,我们需要注意子进程的“僵尸化”问题(PID 1 Zombie Reaping Problem)。这会导致不可预知的和看起来匪夷所思的问题。本文解释了这个问题,也解释了如何去解决,并提供了一种预构建方案:Baseimage-docker 。

/**
* 获取该条记录的自增ID
* 将自增转换为62进制,并拼接网址 如:http://qetee.com/w7e
* 用户访问到 http://qetee.com/w7e 时,提取短网址后缀 w7e
* 将短网址后缀转换为10进制,得到自增ID号 如:123456
* 使用查询该记录,进行业务逻辑处理(比如跳转)
*/
/**
* 十进制数转换成62进制
@gunnarlium
gunnarlium / guzzle-retry.php
Created December 17, 2015 16:23
Example of how to create a retry subscriber for Guzzle 6
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Request as Psr7Request;
use GuzzleHttp\Psr7\Response as Psr7Response;
use Psr\Log\LoggerInterface;
const MAX_RETRIES = 2;
@ionauq
ionauq / PhpStorm Keymap
Last active June 22, 2021 02:42
PhpStorm快捷键
### Editing ###
`Ctrl + Space` 基本代码完成(任意类的,方法的或者变量的名称)
`Ctrl + Shift + Enter` 补全当前语句
`Ctrl + P` Parameter info (within method call arguments)
`Ctrl + Q` 快速查找文档
`Ctrl + 鼠标滑过` 简明信息查看
`Ctrl + F1` 在插入符号处显示错误或者警告信息
`Alt + Insert` 生成代码...(Getters,Setters,Constructors)
`Ctrl + O` 重写方法
`Ctrl + I` 实现方法
#!/usr/bin/perl
use 5.010;
use warnings;
use strict;
use Geo::IP;
use Parse::Syslog::Line qw( parse_syslog_line );
use Socket qw( getnameinfo NI_NUMERICHOST NI_NUMERICSERV );
use POSIX qw( strftime );
use AnyEvent;
use AnyEvent::Handle::UDP;