Skip to content

Instantly share code, notes, and snippets.

Arian K. ariankordi

Block or report user

Report or block ariankordi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ariankordi / olvclient.php
Created Dec 26, 2019
olvclient. this is stupid and dumb. i've had this on my github profile for 2 years and i've always been ashamed of this. it's literally useless by now and it's served little purpose being on my github page being that it's not a fully featured thicc project and stuff. i know i have like unfinished projects and stuf but they're stuff and they're l…
View olvclient.php
OlvClient by Arian Kordi
Licensed under GNU AGPLv3:
class OlvClient {
View cronch.css
html, textarea {
background-color: #3d3d3d;
color: white;
font-family: sans-serif;
textarea {
border-color: darkgray;
font-family: monospace;
display: block;
height: 100px;
View cheapvps-comparison.php
//ini_set('display_errors', 1);
$db = new SQLite3('cheapvps-comparison.db');
CREATE TABLE "offers" (
"url" text NOT NULL,
"post_type" integer NOT NULL,
ariankordi / sh-cgi-term.cgi
Last active Feb 6, 2019
A super simple command line in shell CGI, this is useful for executing commands on a cPanel/Apache shared hosting account LOL
View sh-cgi-term.cgi
if [ $REQUEST_METHOD = "POST" ]; then
$(cat) 2>&1
printf "Content-type: text/html\n\n"
View closedpizza-authorization.rb
# closedpizza-authorization.rb - mruby handler to check if all clients
# have accounts on, checked via ip address and result kept with lrucache
# there is also a redis class in h2o mruby but it probably isn't worth using
# to change returned status code/response for unauthorized users, see end of call method
# paths:
# /:
# mruby.handler-file: /path/to/closedpizza-authorization.rb
ariankordi / realtime-chat-noextlibs.php
Last active Feb 15, 2019
A REAL-TIME (no AJAX polling), database-less, no-setup chat room in PHP, using SSE and shmop
View realtime-chat-noextlibs.php
// This chat thing uses nothing but shmop, but it requires SSE (Server-Sent Events) to work on your server.
// If this chat just does nothing, i.e. you post a message and literally nothing else happens, SSE probably doesn't work.
// Note that this file continuously reads a shared memory block and detects a difference, in order to get live messages.
// This might not be all that efficient, and can be intensive on your server. Don't leave this up for a long period of time.
// This will also not work with PHP's built-in server, due to it being single-threaded. Oh yeah, since this uses SSE, this will use a separate thread for every client that is connected.
// Have fun. This should work right away with no config.
// set the size of these shared memory blocks, "message buffers" here
ariankordi / unix socket reverse proxy thing.php
Last active Feb 1, 2019
Reverse proxy to a UNIX socket with PHP, for when you are running Go web apps on cPanel servers or something like that LOL (complete with header and multipart POST form parsing!) Doesn't work with WebSocket though.
View unix socket reverse proxy thing.php
// This works best on Apache, and if you have enable_post_data_reading off.
// Set "php_flag enable_post_data_reading off" in your htaccess. It'll avoid having to parse multipart forms.
// enter the sock to connect to here
const SOCK_TO_CONNECT_TO = './run.sock';
// Close the session right now, because it might make everything faster, and we don't know how long the response will last for.
# This script scrapes Crunchyroll to get an m3u8 and caption file.
# It then uses ffmpeg to download + mux it all into a single mp4.
# It uses awk for EVERYTHING. Sorry? I really wanted to use Python or something
# but that would make it into just a Python thing, or Node or whatever.
# This was painful though because I hate awk.
# See if argv has enough params
if [ $# -lt 2 ]; then
ariankordi / librespot-download.go
Last active Nov 19, 2018
downloads track(s) (plural) from spotify (premium) with librespot LO LOLOLOLOLLO OLOLOLLOLLOLOOLLOLOOLOLOLOOLOLOLOLOLO
View librespot-download.go
package main
// AS OF this being posted, librespot-golang has some deadlocking and you will need to use this fork:
import (
ariankordi /
Last active Nov 19, 2018
A script that just creates a post to, and requires a login token
# requirements: hyper selectolax
from sys import exit
from ssl import CERT_NONE
import hyper
You can’t perform that action at this time.