Skip to content

Instantly share code, notes, and snippets.

View izuolan's full-sized avatar

ZuoLan izuolan

View GitHub Profile
@izuolan
izuolan / worker.js
Last active July 6, 2023 15:15
Custom domain for your Craft.do pages. Demo: https://next-craft.vercel.app and Tutorial: https://zuolan.me/en/next_craft_en
// Your domain name
const MY_DOMAIN = 'note.example.com'
// Website language
const LANG = 'en'
// Favicon url
const FAVICON_URL = 'https://example.com/favicon.ico'
// Your config page link
@izuolan
izuolan / gmail.sh
Created March 11, 2017 05:56
检测 Gmail 新邮件并发送通知到桌面,同时弹窗提醒。
#! /bin/bash
# 账号密码
USER_NAME="user_name@gmail.com"
PASSWORD="user_password"
# 如果想使用邮件客户端打开可以替换,默认打开浏览器。
MAIL_SOFTWARE="xdg-open $LATEST_MAIL_LINK"
# 获取 XML
XML=$(curl -su $USER_NAME:$PASSWORD "https://mail.google.com/mail/feed/atom" | tr -d '\n' | sed 's/&amp;/\&/g' | sed 's:</entry>:\n:g')
@izuolan
izuolan / polipo.conf
Created March 11, 2016 11:22
polipo设置socks转http代理。
# This file only needs to list configuration variables that deviate
# from the default values. See /usr/share/doc/polipo/examples/config.sample
# and "polipo -v" for variables you can tweak and further information.
logSyslog = true
logFile = "/var/log/polipo/polipo.log"
socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5
chunkHighMark = 50331648
@izuolan
izuolan / apt-get没有公钥.md
Created March 11, 2016 11:20
修复公钥问题
  • 首先删除用户目录下的.gnupg

  • 然后mv /etc/apt/trusted.gpg.d /etc/apt/trusted.gpg.d.old

  • 最后可以重新导入秘钥sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys

@izuolan
izuolan / nginx-proxy.md
Last active February 19, 2017 16:57
docker的nginx反向代理

jwilder/nginx-proxy

启动nginx反向代理:

docker run --name nginx -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t --restart=always jwilder/nginx-proxy

再启动其他容器,如:

docker run -e VIRTUAL_HOST=yourdomain.com -d tutum/apache-php

@izuolan
izuolan / gradle.properties
Last active March 11, 2016 11:14
gradle.properties set proxy
<!-- lang: shell -->
systemProp.http.proxyHost=www.proxyhost.org
systemProp.http.proxyPort=1080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=www.proxyhost.org
systemProp.https.proxyPort=1080
systemProp.https.proxyUser=userid
@izuolan
izuolan / BuildArchLinuxARM.sh
Created October 20, 2015 06:25 — forked from luxas/BuildArchLinuxARM.sh
Raspberry Pi Arch Linux ARM builder from source to SD Card. One command install.
#!/bin/bash
#
# This is a script for writing the latest Arch Linux ARM files to a SD Card
#
# Based on this tutorial
# http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2
#
# Usage:
# sudo sh BuildArchLinuxARM.sh [your sd card here]
#