Skip to content

Instantly share code, notes, and snippets.

View xiongxin's full-sized avatar
:bowtie:
Let It Go

熊鑫 xiongxin

:bowtie:
Let It Go
View GitHub Profile
@xiongxin
xiongxin / CoC.ml
Created February 28, 2023 06:16 — forked from hirrolot/CoC.ml
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
@xiongxin
xiongxin / lexer.cpp
Created March 28, 2022 09:45 — forked from arrieta/lexer.cpp
Simple C++ Lexer
// A simple Lexer meant to demonstrate a few theoretical concepts. It can
// support several parser concepts and is very fast (though speed is not its
// design goal).
//
// J. Arrieta, Nabla Zero Labs
//
// This code is released under the MIT License.
//
// Copyright 2018 Nabla Zero Labs
//
@xiongxin
xiongxin / 📊 Weekly development breakdown
Last active October 29, 2020 15:52
📊 Weekly development breakdown
Rust 13 hrs 16 mins ████████████████░░░░░ 76.3%
Bash 2 hrs 14 mins ██▋░░░░░░░░░░░░░░░░░░ 12.9%
Java 49 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.7%
Agda 26 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.6%
Vala 13 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.3%
@xiongxin
xiongxin / 1. 不同环境的不同分支.md
Last active September 9, 2018 08:34
GIT版本管理使用笔记
  1. 开发环境 release分支
  2. 测试环境 release/development分支
  3. 预发布环境 release分支
  4. 生产环境 master分支
@xiongxin
xiongxin / Elixir Supervisor 三种不同的strategy.md
Last active September 19, 2018 02:05
Elixir Supervisor 三种不同的strategy
defmodule KVServer.Application do
  # See https://hexdocs.pm/elixir/Application.html
  # for more information on OTP Applications
  @moduledoc false

  use Application

  def start(_type, _args) do
 # List all child processes to be supervised
@xiongxin
xiongxin / 1初始化服务器.md
Last active September 1, 2018 09:47
GenServer使用指南
@xiongxin
xiongxin / httpd.conf
Created August 23, 2018 03:33
apache httpd 跨域配置
<VirtualHost *:88>
ServerAdmin support@eccang.com
#php_admin_value open_basedir "/data/www/SmartSell:/data/www/SmartSell/public:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/data/www/SmartSell/public"
ServerName backendstool.eccang.com
ErrorLog "/home/wwwlogs/backendstool.eccang.com-error_log"
CustomLog "/home/wwwlogs/backendstool.eccang.com-access_log" combined
# Always set these headers.
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
@xiongxin
xiongxin / rust编译器windows安装步骤.md
Created August 23, 2018 03:22
rust编译器windows安装步骤

window10安装使用msvc报错问题,所以选择gnu编译器

  1. rustup toolchain install stable-x86_64-pc-windows-gnu
  2. rustup default stable-gnu
@xiongxin
xiongxin / 步骤.md
Last active August 14, 2018 09:59
Elasticsearch建表步骤

建表mapping

PUT /spider_amazon_product_monitor

{
   "JSON文件"
}

插入一条数据

@xiongxin
xiongxin / regex_example.txt
Created January 13, 2018 03:52 — forked from kiinlam/regex_example.txt
正则匹配
正则匹配
匹配中文字符的正则表达式: [\u4e00-\u9fa5]
评注:匹配中文还真是个头疼的事,有了这个表达式就好办了
匹配双字节字符(包括汉字在内):[^\x00-\xff]
评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)
匹配空白行的正则表达式:\n\s*\r
评注:可以用来删除空白行