This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . '/Workerman-master/Autoloader.php'; | |
use Workerman\Worker; | |
use Workerman\Connection\AsyncTcpConnection; | |
use Workerman\Protocols\Websocket; | |
use Workerman\Lib\Timer; | |
$udp1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
socket_set_option($udp1, SOL_SOCKET, SO_BROADCAST, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Cheerio-powered parser for the DJ DATA score page on the beatmania IIDX website. | |
Requires 'cheerio', 'request', and 'iconv' packages. | |
Needs 'Cookie' header from manual login for authentication. | |
Results in an array of JSON-formatted scores, which looks like this: | |
{ | |
"songs": [{ | |
"song": { | |
"name": "SONG NAME", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name example.com www.example.com; | |
if ($http_x_forwarded_proto = "http") { | |
return 301 https://$server_name$request_uri; | |
} | |
... directives to generate a response | |
} |