Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
BUILDING

AlanDecode AlanDecode

🛠️
BUILDING
View GitHub Profile
@AlanDecode
AlanDecode / terminal_extend
Last active Oct 22, 2020
命令行扩展
View terminal_extend
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"
View PubKeys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOxELNqPe5f6gYM7itWt/HNMjvx8LN+gGWMT5YyTMht7OSTWWb24GsxhEO2oan92feQxiog149Q1WRyBX8rkf1VRJ+WWXY+MC+18N1M/4aExKqlDT2bXrCEOy+95XeNC0rmXF7dVuZwqKqJ55Tr96idGx3ny+Ozi15FkdQaY2TZYbjImlmGb5SzPrw0YquE8OFtkckG7sHSdWOA5V3olhnmkmxDHnCanAtuvnWE0fNEVKbKmMJ5ThOZhXKu/NG+gnfGKY2xEQFWz8cfxmDwUmEljC7L6Hlkr3XinOsUpf4uURCSNdSZOVHC5nMSXbI7VL8ZQSFeIgxZzC7nObj4p8x alan@MBP_main
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfqaAIwhHhoTHelVb7fTwv5Y5FtI0YpStscV5fCtVTA6sv9vTOpAQe+m6iZUMwmyBjLtsSrLZiEYEEgpZwJscdVJ0ebRnKLVwOYSR2RuCA0NJPgxSLj0K5vOlzSv5jluN6/jtQ76ELw4VcYmy5kCsleGorFnzv0kJ+ZKP1rvwMM1AZpnzyZh/ohshUXn5HowT2h6GO3cWV6dwg+/7uOxe6C19iTU93yucD7/8PM2v3DUoL9+RV6CsXxzozyWf3XEr+yP2hBHxQFnMQL2SG8fGV5/mMKvbygVpFQqQx10xxQ1sQ6fsKO4zDJRAyNEuTXm2Dgkm0HzdH+DP4FIAZbUNf zyt@bl-rtx
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC90BivnHtr+JnW8WhUDcmlhX246He5xdM+4kEvvd4ej5xjo8rka1opaF181SzbjHUDTIf0CKBi8Ef/cLPZnJ3iVyPTkT7OvlwwzV0WiFekMB13FQ0WiU5XJenVlR9CxiZ3jGNb3m86CaZYeILRdr8AGk5mS5kN4bKTb4dwzd7rjsL7hvY7hnhx7jK5XG5ZbmrrXNbL4
@AlanDecode
AlanDecode / getDownloadInfo.php
Last active May 19, 2020
从 GitHub API 获取仓库附件下载量。受 API 限制,下载量统计不包括 Source ​code。
View getDownloadInfo.php
<?php
/**
* GitHub Release 下载监控
*
* @author AlanDecode | 熊猫小A
* @link https://www.imalan.cn
* @version 1.0
*/
$UserName = 'AlanDecode';
@AlanDecode
AlanDecode / _readme.md
Created Jun 10, 2019 — forked from gka/_readme.md
PHP Endpoint for Github Webhook URLs
View _readme.md

PHP Endpoint for Github Webhook URLs

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.

  1. 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
@AlanDecode
AlanDecode / mapTzGeo.js
Last active May 2, 2019
Map timezone name to latitude and longitude of the city.
View mapTzGeo.js
// 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],
View DarkModeSwitch.js
// 首先需要先引入依赖:
// 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],
@AlanDecode
AlanDecode / Markdown-Demo.md
Created Jan 29, 2019
一份 Markdown 示例文件
View Markdown-Demo.md

二级标题

三级标题

四级标题

五级标题
六级标题
You can’t perform that action at this time.