Skip to content

Instantly share code, notes, and snippets.

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

Firas Khalil Khana firasuke

🎐
لَا بُدَّ مِنْ رِيحٍ تُبَدِّدُ اَلْغُيُومْ...
View GitHub Profile
@tokhi
tokhi / unixToolbox.md
Last active December 17, 2023 20:43
Collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users.

#Unix Toolbox

This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.

##Unix Toolbox revision 14.4

The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.
Error reports and comments are m
@lh3
lh3 / getopt.c
Last active November 12, 2022 17:23
Portable getopt/getopt_long from musl
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include "getopt.h"
char *optarg;
int optind=1, opterr=1, optopt, __optpos, optreset=0;
#define optpos __optpos
@tterb
tterb / README-badges.md
Last active April 16, 2024 03:21
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@Rabios
Rabios / rectangle.java
Created August 10, 2020 20:18
Extending for raylib rectangle class for java bindings,Place it before main void
public static class Rectangle extends Raylib.Rectangle {
public Rectangle() {
super();
}
public Rectangle(float x, float y, float width, float height) {
x(x);
y(y);
width(width);
height(height);
}
@Rabios
Rabios / numtable.lua
Last active June 11, 2021 21:51
Simple way to get biggest and smallest number from table in Lua
-- Written by Rabia Alhaffar in 26/September/2020
-- Simple way to get biggest and smallest number from table in Lua
local function bignum(t)
local _ = -math.huge
for i in ipairs(t) do
if (t[i] >= _) then
_ = t[i]
end
end
return _
@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
@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 / 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 / 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