#参考资料
###下载单个文件,默认将输出打印到标准输出中(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. | |
# |
<?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 |
#Hello World Characters of Code Comparison | |
##JavaScript | |
[Preview](http://embed.plnkr.co/blHgfEJV8y2yQcWZKRqo/preview) | |
Characters: 700 | |
Lines of JavaScript: 13 |