Skip to content

Instantly share code, notes, and snippets.

View SuperFloppies's full-sized avatar

SuperFloppies

View GitHub Profile
/*
* Size of numbers.
*/
#include <stdio.h>
int
main(int argc, char *argv[]) {
long double i = 0.0;
double j = 0.0;
@SuperFloppies
SuperFloppies / array.hh
Created February 27, 2019 00:00
C++ basic array template
template <typename T>
class Array {
private:
size_t mAlloc, mLength;
bool mResizable;
T * mItems;
public:
Array(size_t ilen = 0) : mAlloc(ilen), mLength(0), mResizable(true), mItems(nullptr) {
if(mAlloc) mItems = new T[mAlloc];
@SuperFloppies
SuperFloppies / mast-find-notpriv.py
Created November 1, 2018 21:00
Silly script to (try) to find public, unlisted posts
#!/usr/bin/python3
import requests
import json
import time
from bs4 import BeautifulSoup
import html2text
from datetime import datetime
from datetime import timezone
import dateutil.parser as dp
(Skipping the whole entering-the-keys-thing.)
Done! Saving keymap as 'keymap.dat'.
The following keys are NOT MAPPED:
CTRL+ALT+D
CTRL+ALT+L
CTRL+ALT+T
F1
F11
ALT+F1
#include <stdint.h>
typedef struct state_t state_t;
typedef struct ctrl_t ctrl_t;
typedef struct src_t src_t;
#define CTRL_STRUCT \
uint8_t exec : 1; \
uint8_t irq : 1; \
uint8_t err : 1; \
@SuperFloppies
SuperFloppies / a.cc
Last active September 10, 2018 20:49
#include <jni.h>
static JavaVM *gJavaVM = nullptr;
static JNIEnv *gJavaEnvironment = nullptr;
static jobject gMainActivity = nullptr;
static pthread_t gServerThread = { 0, };
static std::string gStorageDir = std::string{""};
static jobject gClassLoader;
static jmethodID gFindClassMethod;
$ pacman -Q|grep -i font
adobe-source-serif-pro-fonts 2.007ro+1.007it-1
cantarell-fonts 1:0.111-1
dina-font 2.92-6
fontconfig 2:2.13.0+15+gc60ed9e-1
fontforge 20170731-2
gsfonts 20180524-1
lib32-fontconfig 2:2.13.0+15+gc60ed9e-1
libfontenc 1.1.3-2
libxfont2 2.0.3-1
### Keybase proof
I hereby claim:
* I am superfloppies on github.
* I am superfloppies (https://keybase.io/superfloppies) on keybase.
* I have a public key ASBTeoP68t3-I5Sbn6SMxSGaDh37xNkhIiLq0v-VzBzRHQo
To claim this, I am signing this object: