Skip to content

Instantly share code, notes, and snippets.

View david-prv's full-sized avatar
Coffee - The finest organic suspension ever devised!

David david-prv

Coffee - The finest organic suspension ever devised!
  • Germany
View GitHub Profile
<?php
use Quicky\App;
use Quicky\Http\Request;
use Quicky\Http\Response;
$app = App::create();
$mustache = new Mustache_Engine();
App::session()->start();

❗ Deprecated ❗

Check out our official documentation for all latest features: https://quickyphp.de/docs/

0. Global Methods

/* Functionality */
Quicky::create(bool $catchErrors = false, string $mode = ""): Quicky; // creates Quicky instance
Quicky::use(array $settings): void; // set custom settings
Quicky::route(string $method, string $pattern, callable $callback, ...$middleware): void; // adds a new route
Quicky::render(string $viewName, ?array $params = null): void // render a view
var mysql = require('mysql');
/**
* Class ConnectionPool
*
* This class is responsible for creating an usable connection pool
* to an existing SQL database. Its use is to be a single collection of usable
* connections. This class prevents that the program opens too many connections.
*/
class ConnectionPool {
import requests
import sys
import re
# Host specifications
TARGET_HOST = "217.160.50.52"
TARGET_PORT = "80"
TARGET_USER = "vulnbox"
TARGET_PASS = "i4m_4_pr1v4t3_vu1nb0x"
@david-prv
david-prv / convert_ppm.sh
Last active May 24, 2022 12:01
Simple script to generate ppm files from jpegs using 'imagemagick' and pacman package manager
#! /bin/bash
# check for arguments
if [ $# -eq 0 ]
then
# no args passed
echo "Usage: ./convert_ppm.sh <input file> <output file>"
exit 1
fi
@david-prv
david-prv / vpn_connect.sh
Last active May 19, 2022 09:54
Automatically connect to UdS VPN without entering ANY password
#! /bin/bash
echo "<YOUR_PASSWORD>" | sudo openconnect -u <YOUR_USERNAME> --passwd-on-stdin asa2.uni-saarland.de
// Requirements:
// - request
// - jsdom
const request = require('request');
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
/**
* Ensure correctness of public ipv4 by using external ip resolver
const font_rules = {
allowedExtensions: ".woff,.ttf,.woff2,.otf,.fnt",
path: '/fonts/extra',
route: '/fonts/list'
}
/**
* Dynamic font loader library
*/
class DynamicFontLoader {
// Constant variables
const NO_CONTAINER_FOUND = "No container was found. Please create one and try again.";
const NO_LOCATION_DEFINED = "No location definition was found. You can use 'exact_loc' or 'host_only'.";
const NO_CALLBACK_DEFINED = "No callback function was defined.";
const LOCATION_EXACT = "exact_loc";
const LOCATION_HOST = "host_only";
// Settings
var configuration = {
'API_URL': "TRACKING_API_ROUTE",
<!-- Paste this into your <footer> section! -->
<!-- This snippet uses standard container 'visitor-count' -->
<!-- Begin Visitor Count -->
<script id="vc-src" src="https://dev.nani-games.net/scripts/ajax.min.js"></script>
<script id="ajax-src" src="https://dev.nani-games.net/scripts/visitor.min.js"></script>
<script type="text/javascript">
let c = new VisitorCounter('exact_loc', function(data) { console.log(data); }, false);
c.useContainer();c.make();
</script>