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 / client.nim
Created February 25, 2016 13:10
nim sockets
import net
import rawsockets
import strutils
const SERVER_PORT = Port(1987)
const SERVER_ADDR = "localhost"
var canQuit = false
proc main() =
@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 / bs.dart
Last active October 9, 2019 18:52
Angular Dart ViewChild ContentChild example
import 'dart:html';
import 'package:angular/angular.dart';
import 'package:angular_forms/angular_forms.dart';
@Component(
selector: 'child-directive',
template: '<p>child</p>'
)
@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 9, 2018 08:34
GIT版本管理使用笔记
  1. 开发环境 release分支
  2. 测试环境 release/development分支
  3. 预发布环境 release分支
  4. 生产环境 master分支
@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