#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
| # === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
| # | |
| # by Fotis Evangelou, developer of Engintron (engintron.com) | |
| # | |
| # ~ Updated December 2021 ~ | |
| # | |
| # | |
| # The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
| # If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
| # | 
| chmod 700 ~/.ssh | |
| chmod 644 ~/.ssh/authorized_keys | |
| chmod 644 ~/.ssh/known_hosts | |
| chmod 644 ~/.ssh/config | |
| chmod 600 ~/.ssh/id_rsa | |
| chmod 644 ~/.ssh/id_rsa.pub | |
| chmod 600 ~/.ssh/github_rsa | |
| chmod 644 ~/.ssh/github_rsa.pub | |
| chmod 600 ~/.ssh/mozilla_rsa | |
| chmod 644 ~/.ssh/mozilla_rsa.pub | 
| <?php | |
| class Math { | |
| /** | |
| * The base. | |
| * | |
| * @var string | |
| */ | |
| private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | 
| logs/ | 
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
| #! /bin/sh | |
| # Installation | |
| # - Move this to /etc/init.d/myservice | |
| # - chmod +x this | |
| # | |
| # Starting and stopping | |
| # - Start: `service myservice start` or `/etc/init.d/myservice start` | |
| # - Stop: `service myservice stop` or `/etc/init.d/myservice stop` | 
| // Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
| (function poll(){ | |
| $.ajax({ url: "server", success: function(data){ | |
| //Update your dashboard gauge | |
| salesGauge.setValue(data.value); | |
| }, dataType: "json", complete: poll, timeout: 30000 }); | |
| })(); | 
| <?php | |
| class Process | |
| { | |
| protected | |
| $command = '', | |
| $outputFile = '', | |
| $pidFile = '' | |
| ; | 
| class ThriftConnection(object): | |
| def __init__(self, service, host, port): | |
| socket = TSocket.TSocket(host, port) | |
| self.transport = TTransport.TFramedTransport(socket) | |
| protocol = TBinaryProtocolAccelerated(self.transport) | |
| self.client = service.Client(protocol) | |
| self.transport.open() | |
| self.open_time = time.time() | |
| self.access_time = self.open_time | |
| self.str = "%s#%d(%s:%d/%s)" % (self.__class__.__name__, id(self), host, port, service.__name__.rsplit(".", 1)[-1]) | 
| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront |