This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--primary-color: #2c3e50; | |
--bg-color: #f8f9fa; | |
--body-background: #f8f9fa; | |
--text-color: #333333; | |
--meta-color: #666666; | |
--border-color: #e9ecef; | |
--header-bg: #ffffff; | |
--hover-color: #d71a1b; | |
--summary-color: #6c757d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Be Bold Creative Strategic</title> | |
<style> | |
* { | |
font-family: sans-serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs' | |
const rawFile = 'bookmarks.json' | |
const outputHTML = 'bookmarks.html' | |
const pinboardData = JSON.parse(fs.readFileSync(rawFile).toString()) | |
fs.writeFileSync(outputHTML, `<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!--This is an automatically generated file. | |
It will be read and overwritten. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title></title> | |
<style> | |
*, | |
*::after, | |
*::before { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const amountFormatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'CNY' }) | |
/** | |
* 1234567.12 to 1,234,567.12 | |
* @param amount | |
*/ | |
export const formatAmount = (amount: number): string => { | |
if (typeof amount === 'undefined') { | |
return '' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hugo list all > posts.csv | |
/* | |
When you export your markdown files from other application or system, | |
Files' created time will be incorrect. | |
This script fix these time by its date from hugo front matter. | |
works by `touch` command | |
*/ | |
const fs = require('fs') | |
const path = require('path') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# assume that you have installed homebrew, wget and fx(https://github.com/antonmedv/fx) | |
# do all things in /tmp | |
mkdir -p /tmp/fnm-node; | |
pushd /tmp/fnm-node; | |
# clean tmp | |
rm -fr ./*; | |
mkdir fnm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const fs = require('fs'); | |
const del = require('del'); | |
const Database = require('better-sqlite3'); | |
const db = new Database('typecho.db', { verbose: console.log, readonly: true }); | |
const tmpFolder = path.resolve(__dirname, 'typecho2hugo'); | |
if (fs.existsSync(tmpFolder)) { | |
del.sync(path.resolve(tmpFolder, '*')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias git_as_gucheng='git config user.name "Cheng Gu" && git config user.email "[email protected]" && git config user.signingKey xxxxx' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document domain("www.douyu.com") { | |
.layout-Player-toolbar, | |
.layout-Player-asideMain, | |
.layout-Player-announce, | |
.ChatRank-rankWraper, | |
.FansRankInfo, | |
.ChatTabContainer-titleWraper--tabLi, | |
.ChatTabContainer-titleWraper--tabLi.is-active, | |
.layout-Player-barrage, | |
.PlayerToolbar-signCont { |
NewerOlder