Skip to content

Instantly share code, notes, and snippets.

@antfu
antfu / 📊 Weekly development breakdown
Last active November 20, 2023 10:25
📊 Weekly development breakdown
TypeScript 21 hrs 47 mins ████████████████▒░░░ 67.1%
Vue.js 6 hrs 21 mins ██████▓░░░░░░░░░░░░░ 19.6%
JSON 2 hrs 10 mins ████▒░░░░░░░░░░░░░░░ 6.7%
JavaScript 46 mins ███▒░░░░░░░░░░░░░░░░ 2.4%
@kaicataldo
kaicataldo / gatsby-ssr.js
Last active April 13, 2021 19:13
Dark mode using Gatsby.js
import React from 'react';
export const onRenderBody = function({ setPreBodyComponents }) {
// Load dark mode script in head to prevent FOUC.
setPreBodyComponents([
<script
type="text/javascript"
key="theme-initializer"
src="/set-dark-mode.js"
/>,
@xrkffgg
xrkffgg / Weekly Development
Last active March 7, 2024 12:20
📊 Weekly development breakdown
TypeScript 6 hrs 42 mins ███████████████████▓ 83.9%
Markdown 1 hr 1 min █████▒░░░░░░░░░░░░░░ 12.8%
Bash 8 mins ███▒░░░░░░░░░░░░░░░░ 1.9%
JSON 2 mins ███░░░░░░░░░░░░░░░░░ 0.5%
#!/bin/bash
set -ex
repos='
animate
cascader
checkbox
collapse
dialog
{
"window.zoomLevel": 1,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnType": false,
"prettier.singleQuote": true,
"prettier.semi": false,
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {