Skip to content

Instantly share code, notes, and snippets.

@AbrahamAriel
AbrahamAriel / ChoiceScriptSavePluginInjector.meta.js
Last active March 31, 2023 07:54
ChoiceScriptSavePluginInjector meta for auto updates.
// ==UserScript==
// @name ChoiceScriptSavePluginInjector
// @author AbrahamAriel
// @description Injects ChoicescriptIDE/ChoiceScriptSavePlugin into any CoG games.
// @version 1.8.0
// @license MIT
// @namespace https://gist.github.com/AbrahamAriel/7a8d7cea1d8cbcd82700d67a09942a47
// @updateURL https://gist.githubusercontent.com/AbrahamAriel/6b777529d4558f9f45839f825348ee68/raw/ChoiceScriptSavePluginInjector.meta.js
// @downloadURL https://gist.githubusercontent.com/AbrahamAriel/7a8d7cea1d8cbcd82700d67a09942a47/raw/ChoiceScriptSavePluginInjector.user.js
// @match http://choiceofgames.com/*
/**
* ChoiceScriptSavePluginInjector
*
* ---
*
* Licensed under the MIT License.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
@AbrahamAriel
AbrahamAriel / Haskell-Supermarket-Billing.hs
Created July 31, 2021 18:33
(2017) Haskell, Task 3. Supermarket Billing. This assignment was taken from the book, "Haskell: The Craft of Functional Programming Second Edition" by Simon Thompson. This is my poor attempt at functional programming. At least it worked out well albeit a rather ugly coding.
{-
Supermarket Billing.
Use produceBill to output the complete receipt.
eg. produceBill [1234, 4719, 3814, 1112, 1113, 1234, 0000, 666]
-}
-- Hide lookup from Prelude so we can use our own.
import Prelude hiding (lookup)
@AbrahamAriel
AbrahamAriel / PP-Lab2-Turtle.py
Last active July 31, 2021 18:34
(2017) Programming Paradigm -- Lab 2 (Assignment) -- Functions, Selections, Repetitions, Recursions with Turtle Graphics. (A little bit overkill, I should say myself.)
import random
import turtle
# Name: Window name
# Colour: Background Colour
# Width and Height: Width and Height of Window
def makeWindow(name="MY_WINDOW", colour="white", width=800, height=600):
scr = turtle.Screen()
scr.title(name)
scr.bgcolor(colour)
@AbrahamAriel
AbrahamAriel / OS-Lab7-Assignment2.c
Last active August 17, 2023 08:29
(2017) Lab 7, Assignment 2: "Write a program that takes a string as an argument and return all the files that begins with that name in the current directory and its sub directories. For example > ./a.out foo will return all file names that begins with foo."
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <limits.h>
void listFiles(char* path, char* str) {
DIR *dr = opendir(path);
if(dr != NULL) {
struct dirent *de;
@AbrahamAriel
AbrahamAriel / OS-Lab7-Assignment1.c
Last active August 17, 2023 08:47
(2017) Lab 7, Assignment 1: "Write a program to read all txt files (that is files that ends with .txt) in the current directory and merge them all to one txt file and returns a file descriptor for the new file."
#include <stdio.h>
#include <dirent.h>
#include <string.h>
int main(void) {
FILE *input, *output; // Two files, input and output
char ch; // ch is used to assign characters from input file which will then be copied into the output file
char *txt = ".txt"; // TXT file extension
struct dirent *de;
@AbrahamAriel
AbrahamAriel / PrettyColours.ini
Created July 30, 2017 18:00
[ReShade 3.X] PrettyColours for Euro Truck Simulator 2 by acrox999 (https://forum.scssoft.com/viewtopic.php?f=34&t=244725)
/**
*
* PrettyColours for Euro Truck Simulator 2
* By acrox999 (https://forum.scssoft.com/memberlist.php?mode=viewprofile&u=26762)
*
* Requires ReShade 3.X
* Revision: 31/07/2017
*
* Support and Updates: https://forum.scssoft.com/viewtopic.php?f=34&t=244725
*