Skip to content

Instantly share code, notes, and snippets.

View Zer0xFF's full-sized avatar

Zer0xFF

View GitHub Profile
@Zer0xFF
Zer0xFF / calc.py
Created April 16, 2022 06:13
moodle avg grade calculator
import csv
with open("feedback.csv") as f:
dict_reader = csv.DictReader(f)
total = 0
grade_total = 0
ytotal = {}
ygrade_total = {}
for data in dict_reader:

tmp workaround

cd deps/Dependencies
git submodule add https://github.com/flathub/shared-modules.git
sudo apt update
sudo apt install flatpak flatpak-builder
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
@Zer0xFF
Zer0xFF / diskstatus.ps1
Last active July 1, 2021 14:46
Disk Status Health Report (can be used with dynamic disks)
function Report-Disk
{
param (
$name,
$disks
)
$body = ($disks | Out-String)
$body = "$($name) $($body)"
Send-MailMessage -From 'ME <ME@ME.ie>' -To 'ME <ME@ME.ie>' -Subject 'Potential Disk Failure' -SmtpServer "smtp.gmail.com" -Body $body -Port 587
}
@Zer0xFF
Zer0xFF / README.md
Last active May 31, 2020 19:12
google my business with laravel

Update Google's MyBusiness.php library to play nice with laravel

  • Copy/Paste the following content of update.php to the top of MyBusiness.php
namespace App\Classes;

use Google_Service;
use Google_Service_Resource;
use Google_Model;
use Google_Collection;
@Zer0xFF
Zer0xFF / 0.osx.setup.sh
Last active March 28, 2021 02:36
My Essential Fresh OSX/Windows setup
xcode-select --install
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install b7zip cmake qt5 clang-format zsh mas watch git git-gui graphicsmagick ghostscript npm wget trash composer romkatv/powerlevel10k/powerlevel10k
brew install --cask vscodium vlc qt-creator keka db-browser-for-sqlite
brew install --cask adobe-acrobat-reader teamviewer
pip3 install requests
# pip3 install pandas pyodbc striprtf pathvalidate mysql-connector-python
asm(
"mov %0, %%rsi\n\t"
"mov %1, %%rdi\n\t"
"call _trumpoline\n\t"
:
:
"r" (m_code), "g"(context)
: "rsi", "rdi"
);
@Zer0xFF
Zer0xFF / PS2RedumpV.py
Created February 17, 2020 14:07
Verify Collection Of PS2 Dumps Against Redump
#!/usr/bin/env python3
# pip3 install --user filehash untangle
import os
import untangle
from filehash import FileHash
obj = untangle.parse('redump.ps2.dat')
jmp start
start:
; AL keep track of the result
MOV CL, 1 ; CL keeps track of the number we're dividing
MOV BL, 71; BL keep track of memory location
loop:
inc BL
inc CL
PUSH CL
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPainter>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
@Zer0xFF
Zer0xFF / optimise.cpp
Created December 4, 2019 17:18
CodeGen
bool CJitter::ConstantFolding2(StatementList& statements)
{
bool changed = false;
for(auto statementIterator(statements.rbegin());
statementIterator != statements.rend(); ++statementIterator)
{
STATEMENT& outerStatement(*statementIterator);
if(outerStatement.op == OP_ADD)
{