This file contains 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
# mitmproxy ctx for logging and http for making responses | |
from mitmproxy import http, ctx | |
# status code constants | |
from mitmproxy.net.http import status_codes | |
# http requests are made for getting and sending back user config | |
import urllib.request, urllib.parse | |
# used for making cookie expire date |
This file contains 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
from mitmproxy import ctx | |
from notifypy import Notify | |
import json | |
# represents items but only with answers, populated in response method | |
current_assessment_items = [] | |
# temporary |
This file contains 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
diff --git a/index.js b/index.js | |
old mode 100755 | |
new mode 100644 | |
diff --git a/package.json b/package.json | |
index a003e77..caee25a 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -13,17 +13,19 @@ | |
"bcrypt": "^3.0.6", | |
"bluebird": "^3.5.1", |
This file contains 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
#!/bin/sh | |
# should only need to depend on: any shell (hopefully), curl, sed, date, expr | |
# shamelessly stolen from here n modified | |
# https://web.archive.org/web/20200813201515/https://unix.stackexchange.com/questions/364776/how-to-output-a-date-time-as-20-minutes-ago-or-9-days-ago-etc/364784#364784 | |
relative() { | |
local last_unix=$(date -u --date="$1" +%s) # convert date to unix timestamp | |
local now_unix=$(date +'%s') |
This file contains 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 | |
//ini_set('display_errors', true); | |
define('CLIENT_ID', ''); | |
define('CLIENT_SECRET', ''); | |
// token for a bot, needs to be prefixed with Bot | |
define('TOKEN', ''); | |
// group channel that you have already created, lol, | |
define('CHANNEL_ID', ''); |
This file contains 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
html, textarea { | |
background-color: #3d3d3d; | |
color: white; | |
font-family: sans-serif; | |
} | |
textarea { | |
border-color: darkgray; | |
font-family: monospace; | |
display: block; | |
height: 100px; |
This file contains 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 | |
/* | |
OlvClient by Arian Kordi | |
https://github.com/ariankordi | |
Licensed under GNU AGPLv3: https://choosealicense.com/licenses/agpl-3.0/ | |
*/ | |
class OlvClient { |
This file contains 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 | |
//ini_set('display_errors', 1); | |
$db = new SQLite3('cheapvps-comparison.db'); | |
/* | |
CREATE TABLE "offers" ( | |
"created_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
"url" text NOT NULL, | |
"post_type" integer NOT NULL, |
This file contains 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 | |
// 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 |
This file contains 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
#!/bin/sh | |
if [ $REQUEST_METHOD = "POST" ]; then | |
echo | |
$(cat) 2>&1 | |
exit | |
fi | |
printf "Content-type: text/html\n\n" | |
#echo |