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
//Usually this variable will get passed through method parameters
$emailSendTo = "costumer@t-online.de";
//In this example: ConfirmTemplate. Works this way with every template.
$template = new ConfirmTemplate("We need your confirmation!",
"Your password was changed",
"Hello,<br/>your password was recently changed. Please confirm this action by clicking the confirmation<br/>button below. Thank you!",
"https://google.com/",
"https://nani-games.net",
"Please confirm your action here: https://google.com or cancel here: https://nani-games.net");
<?php
/**
* Class Database
*
* @author Ceytec <david@nani-games.net>
*/
class Database {
private $dbHost = DB_HOST;
private $dbUser = DB_USER;
private $dbPass = DB_PASS;
@david-prv
david-prv / ping.js
Created November 19, 2021 08:37
Example Plugin
/*
| @name Example Plugin
| @description /ping - Command name is defined by filename
| @author David Dewes <hello@david-dewes.de>
*/
/* Add a little description for your command /ping */
module.exports.description = "A command to join the Guest group";
/* If you want to have a channel restriction for this command uncomment & replace id */
{
"name": "8clicks",
"version": "0.0.1",
"description": "8clicks",
"main": "start.js",
"scripts": {
"start": "nodemon start.js"
},
"nodemonConfig": {
"ignore": [
import csv
# CSV FILE
file_name = "hodgepodge_tcp.csv"
# FUNCTION TO PARSE CSV FILE
def parseCSV(file):
arr = []
with open(file, newline='') as csvf:
rd = csv.reader(csvf, delimiter=',')
<!-- 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>
// 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",
const font_rules = {
allowedExtensions: ".woff,.ttf,.woff2,.otf,.fnt",
path: '/fonts/extra',
route: '/fonts/list'
}
/**
* Dynamic font loader library
*/
class DynamicFontLoader {
// Requirements:
// - request
// - jsdom
const request = require('request');
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
/**
* Ensure correctness of public ipv4 by using external ip resolver
@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