Skip to content

Instantly share code, notes, and snippets.

View qguv's full-sized avatar
vibing

Quint Guvernator qguv

vibing
View GitHub Profile
@qguv
qguv / Steam.py
Last active January 29, 2020 02:34
Start Steam, forcing offline mode without a prompt. Save in your Steam folder, "C:\Program Files (x86)\Steam" on x86_64 Windows.
import os
USERFILE = "config/loginusers.vdf"
OFFLINE_KEYS = ["WantsOfflineMode", "SkipOfflineModeWarning"]
with open(USERFILE, "r") as f:
lines = f.readlines()
with open(USERFILE, "w") as f:
nest = 0
/* Input a number and watch it get clobbered by another! */
#include <stdio.h>
#include <stdlib.h>
#define answer(__op1) __asm__ ( \
"movl $42, %0\n\t" \
: "=r" (__op1) \
: "0" (__op1) \
);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qguv
qguv / goban.txt
Created March 7, 2018 16:00
CLI goban for weiqi/baduk/igo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
a ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
b ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
c ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
d ├───┼───┼──═╬═──┼───┼───┼───┼───┼──═╬═──┼───┼───┼───┼───┼──═╬═──┼───┼───┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
e ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@qguv
qguv / formlayout.py
Created January 16, 2018 16:38
Pierre Raybaut's "formlayout" Python module, with some improvements
# -*- coding: utf-8 -*-
"""
formlayout
==========
Module creating Qt form dialogs/layouts to edit various type of parameters
formlayout License Agreement (MIT License)
------------------------------------------
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qguv
qguv / app.py
Last active October 6, 2017 02:16
server communication without page refresh
from random import choice
from flask import Flask, render_template, jsonify
app = Flask(__name__)
@app.route('/page')
def page():
return render_template('page.html')
@app.route('/sensors')
def sensor():
@qguv
qguv / fw.py
Last active September 21, 2017 03:01
Convert latin alphabetic text into several alternate Unicode glyph sets.
#!/usr/bin/env python3
'''
fw.py: Convert latin alphabetic text into several alternate Unicode glyph
sets; fullwidth by default.
Usage:
fw.py [-s STYLE] [text...]
fw.py [-h | --help]
Options:
T1A01 [97.1]
Which of the following is a purpose of the Amateur Radio Service as stated in the FCC rules and regulations?
Advancing skills in the technical and communication phases of the radio art
T1A02 [97.1]
Which agency regulates and enforces the rules for the Amateur Radio Service in the United States?
The FCC
T1A03
Which part of the FCC regulations contains the rules governing the Amateur Radio Service?
#!/usr/bin/env python3
import socket
from random import randrange, shuffle
from threading import Thread
from time import sleep
HOST = '192.168.1.160'
PORT = 1234