Skip to content

Instantly share code, notes, and snippets.

View firasuke's full-sized avatar
🎐
لَا بُدَّ مِنْ رِيحٍ تُبَدِّدُ اَلْغُيُومْ...

Firas Khalil Khana firasuke

🎐
لَا بُدَّ مِنْ رِيحٍ تُبَدِّدُ اَلْغُيُومْ...
View GitHub Profile
@capezotte
capezotte / Replacing_Udev.md
Last active November 11, 2023 00:08
Instructions on replacing udev/eudev on Artix

Replacing udev on Artix Linux

Reminder this is UNSUPPORTED. Reproduce bugs on a stock install with xudev/eudev before reporting them.

Preparations

Do not reboot until you've done them all.

Step 1 - remove udev

@Rabios
Rabios / sys.lua
Last active April 29, 2022 12:04
Detect some operating systems and CPU architecture via Lua
-- Written by Rabia Alhaffar in June 14, 2021
-- Simple script to detect some operating systems and CPU architecture via Lua! ;)
-- Updated: June 14, 2021
-- Also, I would thank NickWilde263 and Nameless on GitHub for their suggestions! <3
-- https://github.com/NickWilde263
-- https://github.com/truemedian
local sys = {
arch = "UNKNOWN",
@Rabios
Rabios / Native.hx
Last active June 11, 2021 21:50
rabios.github.io's Gists load place!
package pancake;
import haxe.Constraints.Function;
/**
* ...
* @author Rabia Haffar
*/
@:native("window.navigator.app")
extern class NavigatorApp {
@Rabios
Rabios / arr2obj.js
Created February 19, 2021 12:03
JavaScript function that converts array to object
function arr2obj(array) {
var result = {};
for (var i = 0; i < array.length; i++) {
result[(i).toString()] = array[i];
}
return result;
}
@Rabios
Rabios / sizeof.js
Last active June 11, 2021 21:51
Returns size (length) of any type if possible
function sizeof(o) {
if (typeof(o) == "object") {
if (o.length !== void 0) {
return o.length;
} else {
var i = 0;
for (var k in o) i++;
return i;
}
} else if (typeof(o) == "string") {
@Rabios
Rabios / copy_array.js
Last active June 11, 2021 21:51
Array consists of copies of other array's elements
function copy_array(a, t) {
var result = [];
if (t == 0 || t == 1) {
result = a;
} else {
for (var i = 0; i <= t - 1; i++) {
for (var j = 0; j < a.length; j++) result.push(a[j]);
}
}
return result;
@Rabios
Rabios / drgtk-lumines_block_rotation.rb
Created November 27, 2020 03:50
Lumines block rotation in DRGTK
# Written by Rabia Alhaffar in 27/November/2020
# OpenLumines 1st test: Block rotation
# This demonstrates a Lumines block and it's rotatable with up arrow key.
=begin
Supporters:
@kniknoo
@LeviDuncanPixel
@Hiro_r_b
=end
def tick args
@Rabios
Rabios / DrawTexturePro3D.c
Created November 5, 2020 22:18
Draw 2D texture with raylib in 3D space
// Draws a texture in 3D space with pro parameters...
void DrawTexturePro3D(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector3 origin, float rotation, float posZ, Color tint)
{
// Check if texture is valid
if (texture.id > 0)
{
float width = (float)texture.width;
float height = (float)texture.height;
bool flipX = false;
@Rabios
Rabios / pyramid.lua
Created September 27, 2020 17:32
Pyramid array creation example
-- Written by Rabia Alhaffar in August/2020
local function pyramid(n)
local result = nil
if (n > 0) then
result = {}
for i = 1, n, 1 do
result[i] = {}
for j = 1, i, 1 do
result[i][j] = 1
end
@Rabios
Rabios / even_or_odd.lua
Created September 27, 2020 17:26
Even or Odd example
-- Written by Rabia Alhaffar in 27/September/2020
-- Even or Odd example
local function even(a)
if ((a % 2) == 0) then
return true
else
return false
end
end