Skip to content

Instantly share code, notes, and snippets.

View lazypwny751's full-sized avatar
🐼
skadoosh

Ahmed lazypwny751

🐼
skadoosh
View GitHub Profile
@briantjacobs
briantjacobs / config.yml
Created November 24, 2015 19:43
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@j-alberto
j-alberto / application.desktop
Last active July 9, 2026 15:23
Very basic ubuntu desktop-file template
[Desktop Entry]
Type=Application
Name=myAppName
Icon=~/myApp/icon.xpm
Exec=~/myApp/launcher
Comment=brief description
Categories=Development;IDE;
Terminal=false
@tonejito
tonejito / sudoers-insults
Last active February 1, 2025 00:36
sudoers.d insults configuration file
# = ^ . ^ =
#
# /etc/sudoers.d/sudoers-insults
# sudoers.d insults configuration file
# Andres Hernandez - tonejito
#
# This file must be mode 0440 and owner root:root
# install --mode 0440 --owner root --group root sudoers-insults /etc/sudoers.d/
#
# Edit with visudo
#include <stdio.h>
int main()
{
//arrays are pretty simple.
//It's a collection of items all of same data type
int ages[] = {1, 3, 4, 54, 34, 2};
int size = 6;
@tcoppex
tcoppex / c_nostd.txt
Last active June 12, 2026 13:39
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.
@jcolebot
jcolebot / basic_snake_game.rb
Last active May 15, 2024 11:42
2D Snake Game made with Ruby
require 'ruby2d'
#you can install Ruby 2D on WIN by entering "gem install ruby2d" in the terminal
set background: 'black'
set fps_cap: 20
#grid size is 20 pixels
SQUARE_SIZE = 20
#for default window size of 480px * 640px, width is 32 (640/20) and height is 24 (480/20) at grid size = 20 pixels
GRID_WIDTH = Window.width / SQUARE_SIZE
GRID_HEIGHT = Window.height / SQUARE_SIZE
@sulincix
sulincix / boot.sh
Created August 26, 2023 12:49
emulate rpi on qemu
qemu-system-aarch64 \
-m 1024 \
-M raspi3b \
-kernel kernel8.img \
-dtb bcm2710-rpi-3-b-plus.dtb \
-sd devuan.img \
-append "console=ttyAMA0 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4" \
-device usb-net,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-usb -device usb-mouse -device usb-kbd \
@FlakM
FlakM / bpf_aya.rs
Created November 3, 2023 13:55
aya rust bpf userprobe tracing
#![no_std]
#![no_main]
use aya_bpf::helpers::bpf_get_current_pid_tgid;
use aya_bpf::helpers::gen::bpf_ktime_get_ns;
use aya_bpf::helpers::bpf_probe_read_user_str_bytes;
use aya_bpf::helpers::bpf_probe_read_kernel_str_bytes;
use aya_bpf::BpfContext;
use aya_bpf::{
macros::map,
macros::{uprobe, uretprobe},
@sulincix
sulincix / zirlamican.patch
Last active December 24, 2024 20:02
go disable unused variable error
diff --git a/src/cmd/compile/internal/types2/stmt.go b/src/cmd/compile/internal/types2/stmt.go
index e79e4cd..e135c1d 100644
--- a/src/cmd/compile/internal/types2/stmt.go
+++ b/src/cmd/compile/internal/types2/stmt.go
@@ -63,9 +63,9 @@ func (check *Checker) usage(scope *Scope) {
sort.Slice(unused, func(i, j int) bool {
return cmpPos(unused[i].pos, unused[j].pos) < 0
})
- for _, v := range unused {
- check.softErrorf(v.pos, UnusedVar, "%s declared and not used", v.name)