Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Showfom's full-sized avatar
💭
I may be slow to respond.

Xiufeng Guo Showfom

💭
I may be slow to respond.
View GitHub Profile
@Showfom
Showfom / dropbox
Created August 11, 2017 22:00 — forked from thisismitch/dropbox
/etc/init.d/dropbox
#!/bin/sh
### BEGIN INIT INFO
# Provides: dropbox
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: dropbox service
### END INIT INFO
@Showfom
Showfom / Analyticus
Created September 10, 2017 12:47
InstantClick with Google Analytic Integration
// Google Analytic
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-54138102-1', 'auto');
ga('send', 'pageview');
// Disqus Comment
var disqus_shortname = "riespandi";
@Showfom
Showfom / IP Service for Cloudflare Worker.js
Created February 9, 2018 21:16 — forked from ZE3kr/IP Service for Cloudflare Worker.js
Demo: https://api.tloxygen.com/ip (Use Cloudflare by default, UPYUN for China) or http://api.tloxygen.net/ip (Only use Cloudflare)
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
async function fetchAndApply(request) {
if(request.url === 'https://api.tloxygen.com/ip' || request.url === 'http://api.tloxygen.com/ip') {
const ip = request.headers.get('cf-connecting-ip')
return new Response(ip)
} else if (request.url === 'https://api.tloxygen.com/country' || request.url === 'http://api.tloxygen.com/country') {
const ip = request.headers.get('cf-ipcountry')
[Unit]
Description=mastodon-sidekiq-default-%i
After=network.target
[Service]
Type=simple
User=mastodon
WorkingDirectory=/home/mastodon/live
Environment="RAILS_ENV=production"
Environment="DB_POOL=50"
@Showfom
Showfom / gpg-signing.md
Created May 3, 2022 04:29 — forked from xavierfoucrier/gpg-signing.md
GPG signing with Git and Github Desktop

Hi Github users,

You can now signed your commits on Github using at least Git 2.18.0 and Github Desktop 1.6.1.

  1. Generate a GPG key and add it to Github: https://help.github.com/articles/generating-a-new-gpg-key (if you don't want to type a passphrase on every commit, you need to press "Enter" when the console will prompt you to type a passphrase)

  2. Configure Git properly by editing the .gitconfig file using the command line git config --global --edit in a terminal, then replace YOUR_GITHUB_EMAIL, YOUR_SIGNING_KEY and GPG_BINARY_PATH with your data

$ORIGIN .
v6.powerdns.org 3600 IN NS lua-ns-v6.powerdns.org.
v6.powerdns.org 3600 IN SOA lua-ns-v6.powerdns.org hostmaster.v6.powerdns.org 1 10800 3600 604800 3600
whoami-ecs.v6.powerdns.org 60 IN LUA TXT "'ip: '..who:toString()..', netmask: '..(ecswho and ecswho:toString() or 'no ECS')"
whoami-port.v6.powerdns.org 60 IN LUA TXT "who:toStringWithPort()"
whoami.v6.powerdns.org 60 IN LUA AAAA "who:toString()"
whoami.v6.powerdns.org 60 IN LUA TXT "who:toString()"
;;;;;;;;;;;;;;