Skip to content

Instantly share code, notes, and snippets.

View rhulha's full-sized avatar

Raymond Hulha rhulha

View GitHub Profile
@rhulha
rhulha / Minesweeper.ts
Created December 10, 2018 12:27
Minesweeper implemented in ~100 lines of TypeScript
function ac(type_: string, father: HTMLElement): HTMLElement {
return father.appendChild(document.createElement(type_));
}
function getById(id: string): HTMLElement {
return document.getElementById(id);
}
function shuffle<T>(a: Array<T>) {
for (var i = 81; i >= 0; i--) {
@rhulha
rhulha / all_in_one.py
Created September 18, 2018 13:48
Create a Sophos UTM9 emailpki user
class Config:
REST_BASE_URL = "https://myip:4444/api/"
AUTH=('token', 'mytoken')
import requests
PGP= {
"comment": "",
"emails": [
"[email protected]"
@rhulha
rhulha / money_gui_new.py
Created October 11, 2017 13:49
A program written in python to display SQL data using appJar and SQLAlchemy
from appJar import gui
from sqlalchemy import create_engine, select, Column, Integer, Text, MetaData, Table, Boolean, String, Date, Numeric
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from datetime import datetime
app = gui("Test SQL Alch (ORM GUI)", "1200x900")
app.setBg("#FF9D40")
engine = create_engine('sqlite:///:memory:')
from appJar import gui
from sqlalchemy import create_engine, select, Column, Integer, Text, MetaData, Table, Boolean, String, Date, Numeric
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from datetime import datetime
app = gui("Test SQL Alch (ORM GUI)", "1200x900")
app.setBg("#FF9D40")
engine = create_engine('sqlite:///:memory:')
#define _WIN32_WINNT 0x0601
#ifdef _MSC_VER
#include <boost/config/compiler/visualc.hpp>
#endif
#include <cstdlib>
#include <string>
#include <sstream>
#include <iostream>
@rhulha
rhulha / TestTemplateInheritance.cpp
Created July 1, 2017 07:12
Testing C++ Template Inheritance
#define _WIN32_WINNT 0x0601
#ifdef _MSC_VER
#include <boost/config/compiler/visualc.hpp>
#endif
#include <cstdlib>
#include <string>
#include <sstream>
#include <iostream>
#define _WIN32_WINNT 0x0601
#ifdef _MSC_VER
#include <boost/config/compiler/visualc.hpp>
#endif
#include <cstdlib>
#include <iostream>
#include <string>
#include <boost/bind.hpp>
package net.raysforge.raycommander;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.JList;
import net.raysforge.easyswing.EasyList;
import net.raysforge.easyswing.EasySplitPane;
@rhulha
rhulha / Q3MD3.bt
Created March 26, 2017 22:01
010 Editor Binary Template for Quake3 MD3 files
//--------------------------------------
//--- 010 Editor v5.0.2 Binary Template
//
// Author: rhulha
// Purpose: 010 Editor Binary Template for Quake3 MD3 files
//--------------------------------------
LittleEndian();
char signature[4];
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.swing.JMenu;
import javax.swing.JTextField;