Skip to content

Instantly share code, notes, and snippets.

@larryli
larryli / .gitlab-ci.yml
Created May 17, 2018 09:39
Gitlab CI build for go project
stages:
- build
compile:
stage: build
script:
- go build -ldflags "-s -w -X main.Version=$CI_COMMIT_TAG"
artifacts:
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
paths:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larryli
larryli / openpgp.txt
Created September 7, 2018 10:01
OpenKeychain 关联用户标识
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:b4448800f2129cd9e136bfffb64fdf3b2d8b022c]
@larryli
larryli / .profile
Created December 27, 2018 03:13
set zh LANG for ssh
#!/bin/bash
if tty | fgrep -q pts ; then
export LANG=zh_CN.UTF-8
fi
@larryli
larryli / Vagrantfile
Last active April 28, 2019 09:36
ESP-IDF Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
class VagrantPlugins::ProviderVirtualBox::Config < Vagrant.plugin("2", :config)
def update_customizations(customizations)
@customizations = customizations
end
end
class VagrantPlugins::ProviderVirtualBox::Action::Customize
@larryli
larryli / ntc.h
Created March 26, 2024 01:33
NTC 100K
#include <math.h>
/**
* 3v3 --- [10K] -+- [NTC] --- GND
* |
* +-- ADC
*/
#define NTC_V 3300
#define NTC_R_PULLUP 10000
#define NTC_R(v) (NTC_R_PULLUP * (v) / (NTC_V - (v)))