Skip to content

Instantly share code, notes, and snippets.

Cheng Gu gucheen

Block or report user

Report or block gucheen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gucheen
gucheen / doc.css
Last active May 28, 2019
css for documentation
View doc.css
body,html{
margin:0
}
body{
padding:2em
}
a{
word-break:break-all
}
pre{
@gucheen
gucheen / generateQueryParams.js
Last active May 17, 2019
generate query params from object like URLSearchParams()
View generateQueryParams.js
const generateQueryParams = (obj) => {
if (typeof obj !== 'object') {
return '';
}
const strs = [];
Object.keys(obj).forEach((key) => {
const k = encodeURIComponent(key);
const item = obj[key];
if (Array.isArray(item)) {
item.forEach((i) => {
View index.html
<h1>Current using</h1>
<h2>Language</h2>
<ul class="list">
<li class="item">
<img
class="logo" src="https://ws1.sinaimg.cn/large/0071ouepgy1g1o880h90xj30t80t8weh.jpg" alt="">
</li>
<li class="item">
<img
class="logo" src="https://i.loli.net/2019/04/02/5ca2f6caa5222.png" alt="">
View dev.md

软件

ack
aria2
asciinema
bat
ctags
curl
diff-so-fancy
fd
View get-weibo-pics.js
const request = require('request');
const util = require('util');
const fs = require('fs');
const path = require('path');
const os = require('os');
const get = util.promisify(request.get);
const post = util.promisify(request.post);
const sleep = (ms) => {
@gucheen
gucheen / index.html
Created Aug 9, 2018
Radio Toggle Switch
View index.html
<fieldset class="radio-switch">
<legend>
Settings
</legend>
<input type="radio" name="lol" id="public">
<label for="public">
On
</label>
<input type="radio" name="lol" id="private">
@gucheen
gucheen / color-scheme-wsl.reg
Created May 19, 2018
color scheme for wsl
View color-scheme-wsl.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
; 00BBGGRR, not RGB!
"ColorTable00"=dword:00000000 ; 0 - black
"ColorTable04"=dword:000000CD ; 1 - dark red
"ColorTable02"=dword:0000CD00 ; 2 - dark green
"ColorTable06"=dword:0000CDCD ; 3 - dark yellow
"ColorTable01"=dword:00EE0000 ; 4 - dark blue
"ColorTable05"=dword:00CD00CD ; 5 - dark magenta
View prettify.scss
$main-font: "Roboto","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
$code-font: "Droid Sans Mono", monospace;
/* PRETTY PRINTING STYLES for prettify.js. */
.prettyprint {
position: relative;
}
/* Specify class=linenums on a pre to get line numbering */
View 读书记录.md
  • 柔软的宇宙
  • 时间的形状
  • 太空全书
  • 星空的琴弦
View eslint-pre-commit.sh
#!/bin/sh
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint"
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".js\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
You can’t perform that action at this time.