Skip to content

Instantly share code, notes, and snippets.

View Tricky1975's full-sized avatar
😎
Just doing my thing. Wanna know more?

Jeroen Broks Tricky1975

😎
Just doing my thing. Wanna know more?
View GitHub Profile
@Tricky1975
Tricky1975 / tablecopy.lua
Created July 15, 2017 10:18
tablecopy -- In case you need a whole new table in stead of only a second var with the same pointer.
--[[
tablecopy.lua
version: 17.07.15
Copyright (C) 2017 Jeroen P. Broks
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
@Tricky1975
Tricky1975 / temperatoera.py
Created October 12, 2017 06:40
Simple script to convert Celcius to Temperatoera and vice vera (Phantasar Chronicles)
#!/usr/bin/python
print "1 = Celcius >> Temperatoera"
print "2 = Temperatoera >> Celcius"
a = None
while (a!="1" and a!="2"): a = raw_input("Enter calculation value: ")
t = raw_input("Temperature: ")
if a=="1":
celcius = float(t)
@Tricky1975
Tricky1975 / prime.pas
Created July 5, 2018 18:34
Quick prime 2 till 100 calculator
{ --- START LICENSE BLOCK ---
***********************************************************
primes.pas
This particular file has been released in the public domain
and is therefore free of any restriction. You are allowed
to credit me as the original author, but this is not
required.
This file was setup/modified in:
2018
If the law of your country does not support the concept
@Tricky1975
Tricky1975 / deepEqual.js
Last active September 7, 2018 14:46
deepEqual
/*
This is nothing more but a small javascript I wrote for task
I was set out to do, but I stored it here, for personal reasons.
If you hae a use for it, oh well, use it. ;)
*/
function deepEqual(a,b){
if (typeof(a)!=typeof(b)) { return false; }
if (a==null && b==null) { return true; }
@Tricky1975
Tricky1975 / quotes.js
Created September 27, 2018 13:17
Silly random quote script for JavaScript (I was bored, mind ya!)
quotes = [
"'Whoever makes no mistakes apparently does nothing at all'\n-- Mark Rutte",
"'Cogito Ergo Sum'",
"'Who wants to play an angel eventually plays the devil'\n-- Blaise Pascal",
"'Momento Mori'",
"'You can work all you want, but others decide your success'\n-- Jeroen Broks",
"'Is love for quick money as blind as love for somebody of the opposite sex?'\n Aziëlla of the House of Rayal",
"'Alea Iacta Est'\n-- Julius Caesar",
"'Freedom can never exist without the freedom to choose your own religion'\n-- Willem van Oranje",
"'A few false notes are only messy. Music without feeling is unforgivable'\n-- Richard Wagner",
@Tricky1975
Tricky1975 / GoldbachsVermoeden.py
Created October 4, 2018 08:13
Goldbach thought every even number higher than 2 is the sum of two prime numbers... This Python script tries this out till 5000
m=5000
ver=[];
for i in range(0,m+1): ver.append(0)
for a in range(1,m+1):
for b in range(1,m+1):
c = a * b;
if c<=m: ver[c]+=1
primes=[]
for i in range(1,m+1):
if ver[i]==2 and (not i in primes): primes.append(i);
@Tricky1975
Tricky1975 / HomeWork_CallBack.js
Created October 25, 2018 10:08
Homework time out exercise - Just a script I created for a campus.
let klaar=false;
const finishHomework=(pos,...nextsubjects)=>{
console.log("\033[32mHomework done for "+nextsubjects[pos-1]+"\033[0m");
doHomework(pos,...nextsubjects);
}
const doHomework=(pos,...nextsubjects)=>{
if (pos>=nextsubjects.length) {
console.log("All done!");
@Tricky1975
Tricky1975 / CASCADE.BAS
Created October 31, 2018 11:17
Nice cascade effect in GW-BASIC! I still got it in me after 30 years.... :P
10 A=35
15 B=-1
20 FOR I=1 TO A
30 PRINT"X";
40 NEXT
50 FOR I=1 TO 75-(A*2)
60 PRINT" ";
70 NEXT
80 FOR I=1 TO A
90 PRINT"X";
@Tricky1975
Tricky1975 / Unsignedchar_signedchar.c
Last active February 1, 2019 15:18
A very simple program in C that quickly gets all signed chars from 0 till 255 and their unsigned counter parts and hex code.
#include <stdio.h>
typedef
union
mc {
char rc;
unsigned char uc;
} mychar;
mychar ch;
@Tricky1975
Tricky1975 / Study_SelfIndexingClasses.cs
Created August 5, 2019 09:22
Study how to make a class myself handling indexes
/*
This was a study source on how to do indexes of my own in C#.
This study can really broaden my views on a few things in C#, and maybe also help me to get rid of a few issues I'm currently suffering in C#
*/
using System;
class test {
public string this[string key] {