Skip to content

Instantly share code, notes, and snippets.

@tomoat
tomoat / gist:045bdd2de7bb0d27350a74aa29ce1a53
Created March 3, 2022 09:48 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@tomoat
tomoat / setNodeMirror.sh
Last active January 23, 2024 02:54 — forked from hetykai/setNodeMirror.sh
修改node npm yarn的镜像源设置,替换为国内的淘宝源
npm set registry https://registry.npm.taobao.org && \
npm set disturl https://npm.taobao.org/dist && \
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass && \
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ && \
npm set puppeteer_download_host https://storage.googleapis.com.cnpmjs.org && \
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver && \
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver && \
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs && \
npm set selenium_cdnurl https://npm.taobao.org/mirrors/selenium && \
npm set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector && \
@tomoat
tomoat / tslint.json
Created April 12, 2019 09:47
TsLint 规则
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {
"no-unused-expression": true
},
"rules": {
"eofline": true,
"semicolon": [true, "never"],
"trailing-comma": false,
@tomoat
tomoat / IdCard.txt
Created May 19, 2018 10:38 — forked from z007/IdCard.txt
正则表达式Id card(身份证)验证
来源:http://www.cnblogs.com/devinhua/articles/1726292.html
1、简单的正则表达式:
(1)preg_match("/^(\d{18,18}|\d{15,15}|\d{17,17}x)$/",$id_card)
(2)preg_match("/^(\d{6})(18|19|20)?(\d{2})([01]\d)([0123]\d)(\d{3}) (\d|X)?$/",$id_card)
(3)preg_match("/(^\d{15}$/)|(\d{17}(?:\d|x|X)$/),$id_card)
@tomoat
tomoat / tslint.md
Created January 30, 2018 07:41 — forked from zxhfighter/tslint.md
tslint 和 codelyzer 规则

TSLint 和 Codelyzer 核心规则

[TOC]

TSLint 核心规则

see tslint core rules

arrow-return-shorthand

@tomoat
tomoat / load_test_data.sh
Created January 4, 2018 08:26 — forked from clintongormley/load_test_data.sh
Run these commands in your shell to setup the test data for Chapter 5
curl -XPUT 'http://localhost:9200/us/user/1?pretty=1' -d '
{
"email" : "john@smith.com",
"name" : "John Smith",
"username" : "@john"
}
'
curl -XPUT 'http://localhost:9200/gb/user/2?pretty=1' -d '
{
@tomoat
tomoat / daemon.py
Created May 7, 2017 07:03 — forked from jamiesun/daemon.py
一个python守护进程的例子
#! /usr/bin/env python2.7
#encoding:utf-8
#@description:一个python守护进程的例子
#@tags:python,daemon
import sys
import os
import time
import atexit
from signal import SIGTERM
@tomoat
tomoat / client.html
Created May 3, 2017 06:45 — forked from agrueneberg/client.html
HMAC-SHA256 example for verifying both the data integrity and the authentication of a request in Node.js and web browsers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HMAC-SHA256 Example</title>
</head>
<body>
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script>
<script>
var sharedSecret, query, signature, hmac, xhr;
@tomoat
tomoat / iconv.js
Created April 13, 2017 08:48 — forked from wuqian/iconv.js
Nodejs抓取非utf8字符编码的页面
var http = require('http');
var options = {
host: 'www.baidu.com',
port: 80,
path: '/s?wd=gfw'
};
var Iconv = require('iconv').Iconv;