I use a GPG key to sign my git commits.
An error like this one might be a sign of an expired GPG key.
error: gpg failed to sign the data fatal: failed to write commit object
| :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; |
| <!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; |
| 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. |
| <!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 { |
| 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 '' | |
| } |
| // 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') |
| #!/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; |
| 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, '*')); |