Skip to content

Instantly share code, notes, and snippets.

View UndoneKittens's full-sized avatar

UndoneKittens

View GitHub Profile
<?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);
@UndoneKittens
UndoneKittens / eamuse_djdata_score_parser.js
Last active July 11, 2018 09:56 — forked from McMaNGOS/eamuse_djdata_score_parser.js
eAmusement beatmania IIDX DJ DATA scores -> JSON
/* 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",
@UndoneKittens
UndoneKittens / nginx.conf
Created September 21, 2017 00:17 — forked from khanhicetea/nginx.conf
NginX https redirect ( Cloudflare's flexible ssl )
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
}