Skip to content

Instantly share code, notes, and snippets.

View DennisGuo's full-sized avatar
🎯
Focusing

Scylla DennisGuo

🎯
Focusing
View GitHub Profile
@DennisGuo
DennisGuo / frpc
Last active September 11, 2019 03:32
The init file for frpc with service and chkconfig , the file shoule locate in `/etc/init.d/frpc`
#!/bin/sh
# chkconfig: 2345 90 10
# description: frpc service
### BEGIN INIT INFO
# Provides: frpc
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: frpc service deamon
@DennisGuo
DennisGuo / sc-app-fwt-intent.md
Last active October 26, 2017 08:50
sc-app-fwt

启动页面和ACTIVITY中,Intent中传递的用户信息

必备

  • TOKEN: 授权TOKEN
  • USER_ID: 用户ID
  • USER_PHONE: 用户手机号

可选

function getRandom(pre, next) {
return pre + (Math.random() * (next - pre)) * 0.01;
}
var num = 200,arr = [] , x = getRandom(113.953640, 116.953640),y = getRandom(22.537018, 25.537018);
arr.push({x:x,y:y});
//阿基米德螺旋
var a =1,b =0.1,fix = 0.001;

The common server side knowleage.

img

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->

This page is a note when leaning dock.

  • The software to remember. 'The Distribued System.'
    • Fleet

      fleet ties together systemd and etcd into a simple distributed init system. Think of it as an extension of systemd that operates at the cluster level instead of the machine level.

    • etcd

>

#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN
# on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise).
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#
# Copyright (C) 2014 Lin Song
# Based on the work of Thomas Sarlandie (Copyright 2012)
import sublime
import sublime_plugin
import re
class CompactExpandCssCommand(sublime_plugin.TextCommand):
def run(self, edit, action='compact'):
rule_starts = self.view.find_all('\{')
rule_ends = self.view.find_all('\}')