Skip to content

Instantly share code, notes, and snippets.

Avatar

Tony Colston tonetheman

View GitHub Profile
@tonetheman
tonetheman / install-love-crontini.sh
Created Jan 2, 2021
Install love2d in crostini on a chromebook
View install-love-crontini.sh
git clone git@github.com:love2d/love.git
cd love
git checkout 11.3
sudo apt-get install autoconf
sudo apt-get install libtool
platform/unix/automagic
sudo apt-get install libsdl2-dev
sudo apt-get install libluajit-5.1-dev
sudo apt-get install libopenal-dev
sudo apt-get install libfreetype6-dev
@tonetheman
tonetheman / test_objects_in_nim.nim
Last active Dec 14, 2020
Testing objects in nim lang. Trying to understand the overloads
View test_objects_in_nim.nim
# define an object type
type Foo = object
x : int
y : int
name : string
# define a proc that takes a Foo
# I named it self for no real reason
proc bob(self:Foo) =
echo "foo.bob",self
@tonetheman
tonetheman / find_radio.py
Created Sep 27, 2020
find a radio button to click on
View find_radio.py
URI = "https://www.16personalities.com/free-personality-test"
from selenium.webdriver import Chrome, ChromeOptions
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
@tonetheman
tonetheman / ReadMaps.py
Created Jun 30, 2020
add a size (in k) for maps file in /proc
View ReadMaps.py
import sys
pid = None
for i in range(len(sys.argv)):
if sys.argv[i] == "--pid" or sys.argv[i] == "-p":
pid = int(sys.argv[i+1])
inf = open("/proc/{0}/maps".format(pid),"r")
data=inf.readlines()
@tonetheman
tonetheman / main.lua
Created Jun 28, 2020
joystick love2d testing
View main.lua
function love.load()
--backgroundImage = love.graphics.newImage("bg2.png")
--mainFont = love.graphics.newFont("m7.ttf", 20)
--love.graphics.setFont(mainFont)
local font = love.graphics.newFont(24)
love.graphics.setFont(font)
screenWidth = love.graphics.getWidth()
screenHeight = love.graphics.getHeight()
internalWidth = 1600
internalHeight = 1200
@tonetheman
tonetheman / CheckSwap.py
Created Jun 10, 2020
Show swap for linux processes
View CheckSwap.py
import os,glob,string,time,sys
all_the_things = []
class P:
def __init__(self,pid,name,swap):
self.pid = pid
self.name = name
self.swap = swap
def __repr__(self):
return str(self.pid) + " " + str(self.name) + " " + str(self.swap)
@tonetheman
tonetheman / CheckSwap.py
Created Jun 10, 2020
Show swap for linux processes
View CheckSwap.py
import os,glob,string,time,sys
all_the_things = []
class P:
def __init__(self,pid,name,swap):
self.pid = pid
self.name = name
self.swap = swap
def __repr__(self):
return str(self.pid) + " " + str(self.name) + " " + str(self.swap)
@tonetheman
tonetheman / wl.html
Created Feb 6, 2020
html to handle number controls
View wl.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="user-scalable=no, width=device-width" />
<style>
input {
border : 3px solid black;
padding : 2px;
@tonetheman
tonetheman / example_classic.lua
Created Feb 6, 2020
classic example for lua OO
View example_classic.lua
--[[
example of using
https://github.com/rxi/classic
]]
local Object = require("classic")
local Actor = Object:extend() -- new class
@tonetheman
tonetheman / example_classic.lua
Created Feb 6, 2020
classic example for lua OO
View example_classic.lua
--[[
example of using
https://github.com/rxi/classic
]]
local Object = require("classic")
local Actor = Object:extend() -- new class