Skip to content

Instantly share code, notes, and snippets.

View eallion's full-sized avatar
🤡
I don't care about Stars.

Charles Chin eallion

🤡
I don't care about Stars.
View GitHub Profile
@eallion
eallion / rename-hugo-post-filenem.sh
Last active November 17, 2022 15:52
rename hugo post filenem format date+slug with front matter
#!/bin/sh
# extracts date from file in the format
# date: 2013-08-23 14:52:59
# and prepends this to the filename
for f in *.md; do
c="$(grep -Eo 'date:\W\"(....-..-..)' $f | cut -d'"' -f2 | xargs)"
s="$(grep -Eo 'slug:\W\"(.+)' $f | cut -d'"' -f2 | xargs)"
mv "$f" "$c-$s.md"
done
@eallion
eallion / curl_tianlangbooks.sh
Created May 25, 2022 14:20 — forked from syhily/curl_tianlangbooks.sh
抓取天浪书屋的蓝奏云下载链接
for((i=1;i<=10302;i++));
do
echo ""
echo ""
echo "Start download book from $i"
echo ""
echo ""
curl "https://www.tianlangbooks.com/$i.html" -H 'authority: www.tianlangbooks.com' --data-raw 'secret_key=359198&Submit=%E6%8F%90%E4%BA%A4' --compressed | grep "蓝奏云盘" >> download.txt
done
@eallion
eallion / index.html
Created May 13, 2022 15:45
Pure CSS and JavaScript news ticker
<div id="ticker">
<div id="ticker-wrapper">
<ul id="ticker-wrapper-inner">
<li>
<figure>
<img src="http://placehold.it/80x80" alt="" />
</figure>
<h3>Item #1</h3>
</li>
<li>
@eallion
eallion / index.html
Created May 12, 2022 16:00
Scroll To Top without jQuery
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,700" rel="stylesheet">
<body id="top">
<h1>
Scroll To Top
</h1>
<div class="long-text">
<p>Scroll down to see the button.</p>
<p>Click the button to see smooth scroll to top.</p>
Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.<br><br>
@eallion
eallion / spicetify.md
Last active October 8, 2025 14:49
spicetify spotify custom

安装 Spicetify-cli

scoop install spicetify-cli

安装 Spotify

scoop install spotify

下载自己的配置文件 eallion/dotfiles

#!/bin/bash
# 优先运行 Firefox-devlopper
if [ `command -v firefox-dev` ]; then
start firefox-dev -private-window "http://127.0.0.1:1313"
else
start chrome -incognito "http://127.0.0.1:1313"
fi
hugo server -w -D -p 1313 -t DoIt --bind 0.0.0.0 --contentDir example --forceSyncStatic --ignoreCache --noHTTPCache --disableFastRender -e production --enableGitInfo
@eallion
eallion / hugo.sh
Last active October 25, 2022 14:08
hugo.sh for coding-download-center
#!/bin/bash
get_latest_release() {
curl --silent "https://api.github.com/repos/gohugoio/hugo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/;s/v//g'
}
version=$(get_latest_release)
sha256sums() {
curl -fsSL "https://github.com/gohugoio/hugo/releases/download/v${version}/hugo_${version}_checksums.txt" | grep "hugo_${version}_linux-amd64.deb" | cut -d " " -f 1
@eallion
eallion / block_domain.md
Last active January 1, 2025 13:58
屏蔽短视频相关域名
  • QQ 看点
  • 百度好看
  • 百度贴吧
  • 百家号
  • 抖音
  • 华为
  • 华为云
  • 火山
  • 快手
  • 美拍
@eallion
eallion / index.html
Last active July 20, 2020 16:48
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>The title</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="" rel="stylesheet" type="text/css">
<script type="text/javascript" src="" ></script>
<!-- Auto refresh -->