Skip to content

Instantly share code, notes, and snippets.

View Sascha-T's full-sized avatar
😀
🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸

Sascha T. Sascha-T

😀
🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸🐸
View GitHub Profile

Keybase proof

I hereby claim:

  • I am sascha-t on github.
  • I am sascha_t (https://keybase.io/sascha_t) on keybase.
  • I have a public key ASBdzlbqt3tZXxqD_HYrXxtau4pbs7rYbWn4FsaLhE0lmgo

To claim this, I am signing this object:

@Sascha-T
Sascha-T / stat.lua
Last active November 3, 2018 19:26
This is a lua script for OpenComputers to get the size of a file (returns 0 on directories)
local args = {...}
local shell = require("shell")
if not args[1] then
print("Please specify a path")
print("stat (PATH)")
require("os").exit()
end
local path = shell.resolve(args[1])
local fs = require("component").filesystem
if not fs.exists(path) then
@Sascha-T
Sascha-T / eeprom.lua
Last active November 5, 2018 17:48
OpenComputers SBoot eeprom (Crunched version made with https://oc.cil.li/index.php?/topic/511-crunch-break-the-4k-limit/)
local gpu = component.proxy(component.list("gpu")())
local y = 1
local x = 1
local screenX, screenY = gpu.getResolution()
local component_invoke = component.invoke
function boot_invoke(address, method, ...)
local result = table.pack(pcall(component_invoke, address, method, ...))
if not result[1] then
return nil, result[2]
@Sascha-T
Sascha-T / taperead.lua
Created December 1, 2018 14:15
OPENCOMPUTERS TapeUtility
local taped = require("component").tape_drive
local fs = require("component").filesystem
local a = {...}
taped.seek(-taped.getPosition())
local r = ""
if taped.read(4) == "fsiz" then
while true do
local partdata = taped.read(1)
if tonumber(partdata) ~= nil then
r = r .. partdata
let grav = 9.8
// Velocity is in meters per second
// Angle is in radians
// Initial Height is in meters
// Returns: Horizontal distance travelled by object
function artillery(velocity, angle, initHeight) {
return Math.pow(velocity, 2) / (2 * grav) * (1 + Math.sqrt(1 + ((2*grav * initHeight) / (Math.pow(velocity, 2) * Math.pow(Math.sin(angle), 2))))) * Math.sin(2*angle)
}

Keybase proof

I hereby claim:

  • I am sascha-t on github.
  • I am sascha_t (https://keybase.io/sascha_t) on keybase.
  • I have a public key ASAmcygx-4FXNqKT2GM538fIUQF1gVVZeKcsD1CwZaF9mQo

To claim this, I am signing this object:

@Sascha-T
Sascha-T / frog.c
Created September 8, 2020 21:23
hex to int :D
int stli(char *c) {
int ret = 0;
while (*c != 0) {
ret = ret << 4;
if(*c >= '1' && *c <= '9') {
ret += *c - 48;
}
if(*c >= 'a' && *c <= 'f') {
ret += *c - 87;
}
@Sascha-T
Sascha-T / index.js
Created March 19, 2021 17:38
Discord Activities Social Thing
{
"name": "activity-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
function pause(){
clear
}
rm *.pem
rm ca.srl
read -p "Enter hostname: " HOST
echo Creating key...
@Sascha-T
Sascha-T / wikipedia.css
Created May 22, 2021 23:56
Very Bad Dark Wikipedia Theme
/*
Made by https://github.com/Sascha-T
*/
.mw-body {
background-color: #131313;
color: #d3d3d3;
border: none;
}
#mw-panel {