Skip to content

Instantly share code, notes, and snippets.

View felix9ia's full-sized avatar
🎯
Focusing

JiaPengFei felix9ia

🎯
Focusing
View GitHub Profile
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@bensteinberg
bensteinberg / pre-commit
Last active January 2, 2023 21:41
pre-commit hook for adding a timestamp to the frontmatter of markdown files
#!/usr/bin/perl
use POSIX qw(strftime);
# this is a pre-commit hook for setting a timestamp in the frontmatter
# of markdown files
my $date = strftime "%Y-%m-%dT%H:%M:%SZ", gmtime;
my @files = `git diff-index --cached --name-only HEAD`;
foreach (@files) {
if (/\.md$/) { # maybe HTML, too?
@anacampesan
anacampesan / copyToClipboard.html
Last active May 20, 2021 10:41
Copy to clipboard without input
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div id="secretInfo" style="display: none;">secret info</div>
<button type="button" id="btnCopy">Copy hidden info</button>