Skip to content

Instantly share code, notes, and snippets.

View niaiwomattt's full-sized avatar
🎯
Focusing

Assassin niaiwomattt

🎯
Focusing
View GitHub Profile
@dnnta
dnnta / city.rb
Created April 20, 2017 09:56
中国城市列表整理
# 数据来源 http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201703/t20170310_1471429.html
# 截止 2016 年 7 月 31 日
# 4 个直辖市下面的市辖区手动处理, 改为对应的名字,如 北京市-市辖区 改为 北京市-北京
# 其他市辖区, 直接去掉, 不入库
# 还有 4 个省直辖县级行政区划也手动处理, 去掉层级关系
class CreateChinaCities < ActiveRecord::Migration[5.0]
def change
create_table :china_cities do |t|
t.integer :code, index: true
@52cik
52cik / docker-batch-pull.sh
Last active October 6, 2023 12:39
docker 镜像批量更新
for i in $( docker images --format "{{.Repository}}:{{.Tag}}" )
do
docker pull $i
done
# or
# docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull
docker image prune -f
@soarez
soarez / ca.md
Last active April 22, 2024 03:01
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.