This file contains 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
// 首先需要先引入依赖: | |
// https://github.com/Triggertrap/sun-js | |
// https://bitbucket.org/pellepim/jstimezonedetect | |
var accurateDarkMode = true; // accurateDarkMode 用以设置是使用精确模式(需要用户授权)还是使用大概的模式(不用授权) | |
var DarkModeSwitcher = { | |
// TimeZone => [lat, lon] | |
mapTzGeo : { | |
'America/Denver': [39.7645187, -104.9951977], |
This file contains 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
// TimeZone => [lat, lon] | |
var mapTzGeo = { | |
'America/Denver': [39.7645187, -104.9951977], | |
'Europe/London': [51.5287352, -0.3817843], | |
'America/Chicago': [41.8339042, -88.0121562], | |
'America/Asuncion': [-25.2966809, -57.6681298], | |
'America/Montevideo': [-34.8207362, -56.3765247], | |
'Asia/Beirut': [33.8892846, 35.4692627], | |
'Pacific/Auckland': [-36.8621448, 174.5852782], | |
'America/Los_Angeles': [34.0207305, -118.6919292], |
If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.
- Put
github.php
somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php
This file contains 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
<?php | |
/** | |
* GitHub Release 下载监控 | |
* | |
* @author AlanDecode | 熊猫小A | |
* @link https://www.imalan.cn | |
* @version 1.0 | |
*/ | |
$UserName = 'AlanDecode'; |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOxELNqPe5f6gYM7itWt/HNMjvx8LN+gGWMT5YyTMht7OSTWWb24GsxhEO2oan92feQxiog149Q1WRyBX8rkf1VRJ+WWXY+MC+18N1M/4aExKqlDT2bXrCEOy+95XeNC0rmXF7dVuZwqKqJ55Tr96idGx3ny+Ozi15FkdQaY2TZYbjImlmGb5SzPrw0YquE8OFtkckG7sHSdWOA5V3olhnmkmxDHnCanAtuvnWE0fNEVKbKmMJ5ThOZhXKu/NG+gnfGKY2xEQFWz8cfxmDwUmEljC7L6Hlkr3XinOsUpf4uURCSNdSZOVHC5nMSXbI7VL8ZQSFeIgxZzC7nObj4p8x alan@MBP_main | |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDJRKpr46AVs98wPL3jdkz/w+4Cchx+mflQvIAIPAT0GECdeBjQ2rvglG+Kuk/YaUnQ9u/CCel/ApCZ0ALam/nouEHpp0Igs7RgW9sctqTqt6W48YyS8FbPetKjwSqMmpFah8Gz/BySJjtZPw3zQhFKsUXSqqHAfkYwzZnwzjcfoM9VIzk+U/e+y6eUEiNv5ZtvxQvBu4aj3myjLWbjEci1yEQOe/oKHX9xZ+9roAYB8E8S1a2MmEpFGD3hlRSptsFg3AJFHZdCtpuJCGxsrnNZ1NeIdBm18buXwsiBCytt73DXj91ptEYKqF4vtq0hijdVvejBckvaRoNq3aCVsjlVHU9LwJK80YNjVq2aT8oMrmYdDVG6M6q97jQt60uAjSGTGcrlY0CWBfFZKS+PlBPW0hHUIbwVUWizo5s+dntBAoptUf754Z7MrwNnDzKNmUNBFrpFN6wQB9fhJnIswm09G8SFvPOB3A8RB3OATx8XfUWkesy2AMkeLy6XdvVdnkU= Blink | |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDesz/WNuTjOVzHtayjyDv/2A7MBBuXk/ |
This file contains 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 update_pubkey="curl https://gist.githubusercontent.com/AlanDecode/735f749a0e433c11b552556ca806c429/raw/ > ~/.ssh/authorized_keys" | |
alias vi="vim" | |
alias size="du -sh" | |
alias count="ls -l |grep '^-'|wc -l" | |
alias gpu="watch -n 1 nvidia-smi" | |
alias setss="export http_proxy=http://127.0.0.1:7890; export https_proxy=http://127.0.0.1:7890; export all_proxy=http://127.0.0.1:7890" | |
alias unsetss="unset http_prpxy; unset https_proxy; unset all_proxy" | |
alias testss="echo Requesting Google...; curl https://google.com" |
This file contains 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
#!/usr/bin/python3 | |
import time | |
try: | |
import RPi.GPIO as GPIO | |
except RuntimeError: | |
print("Error importing RPi.GPIO!") | |
def cpu_temp(): |
This file contains 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
// ==WidgetScript== | |
// @name 🐼 本期支出 | |
// @description 从 Notion 数据库中统计支出情况 | |
// @icon system:chart.bar.xaxis | |
// @iconBgColor #04B921 | |
// @param api {string="https://api.imalan.cn/notion_bkp/stat"} API - URL to your metrics data API | |
// @param token_v2 {string=""} Notion token - 先浏览器登录 Notion,cookie 中名为 token_v2 的字段 | |
// @param db_url {string=""} Database 链接 | |
// @param total_b {string=""} 总支出预算 |
This file contains 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
#!/usr/bin/env python3 | |
"""This is a python script for bookkeeping with notion in CLI. | |
Author: AlanDecode | |
Link: https://blog.imalan.cn/archives/track-your-expense-with-notion/ | |
License: MIT | |
Version: 1.0 | |
First, you need to setup a notion database. Create a database(Table-Full page), | |
and set its properties(columns) as: |