Skip to content

Instantly share code, notes, and snippets.

View Theldus's full-sized avatar
🙃

Davidson Francis Theldus

🙃
View GitHub Profile
#!/bin/bash
############################
####Make Jar by Theldus#####
############################
usage()
{
echo -e "Usage: \n$0 <main-class> <.class folder>"
echo " main-class : Your main class, without extension"
echo " .class folder: Where are your binary files"
@Theldus
Theldus / xmas.c
Created December 24, 2017 22:25
Just a christmas tree =)
#include <ncurses.h>
#include <unistd.h>
void xmas()
{
static int color1 = 1;
static int color2 = 2;
attron(COLOR_PAIR(color1) | A_BOLD);
mvprintw(0, 30, " __ __) \n");
[BITS 16]
;###############################################################################
; -.- Initial Setup -.-
;###############################################################################
;Setup stack
mov ax, 07C0h
add ax, 20h
mov ss, ax
@Theldus
Theldus / replace.sh
Last active March 31, 2018 08:14 — forked from hlissner/replace.sh
Bulk search & replace with ag (the_silver_searcher)
# ag <https://github.com/ggreer/the_silver_searcher>
# usage: ag-replace.sh [search] [replace]
# caveats: will choke if either arguments contain a forward slash
# notes: will back up changed files to *.bak files
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g"
@Theldus
Theldus / sendRawEth.c
Created April 23, 2018 23:37 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>

Keybase proof

I hereby claim:

  • I am theldus on github.
  • I am davidsondfgl (https://keybase.io/davidsondfgl) on keybase.
  • I have a public key ASBT90W6Aw9bYqrJ1f-30Pa5TNBW6O3EpcpOCw9CbnKTZwo

To claim this, I am signing this object:

@Theldus
Theldus / libs.s
Created April 23, 2020 02:38
Dynamic library from scratch =)
; ------------------------------
; nasm -f bin -o libs.so libs.S
; ------------------------------
BITS 64
org 0
ADDR equ 0x200000
; Elf header constants
ET_DIN equ 3
@Theldus
Theldus / bytecode.patch
Last active May 7, 2020 22:59
Makes javap more objdump-like =), enjoy
# Victorique de Blois byte patch v3.0 =), by Theldus
#
# This patch edits the javap source code so that when using the '-c' option, in
# addition to the instruction, the bytes related to it are also emmited, something
# similar to what objdump does. An example of output follows below:
#
# Compiled from "hello.java" (Victorique de Blois, byte dump patch v3.0 by Theldus)
# public class hello {
# public hello();
# Code:
@Theldus
Theldus / vlc_recent_files.patch
Created October 20, 2020 17:38
Increase maximum recent files on VLC
# Increase maximum recent files on VLC, by Theldus
#
# First of all, this is not an official patch!, apply at your
# own risk, nonetheless, it should be safe =).
#
# Second of all, it's so much easy to increase this limit, why on earth VLC
# uses a hardcoded number? 10 at the moment. VLC already saves more than 10
# items on the ~/.config/vlc/vlc-qt-interface.conf, so why not makes use of
# such thing? I really dont know. Anyway, apply this and be happy.
#
@Theldus
Theldus / disksize.c
Created December 2, 2020 05:52
'fdisk-like' tool tha lists all the 4 partitions in the MBR scheme for a given file/device
/*
* Public domain, do whatever you want with this.
*
* Build: gcc disksize.c -o disksize -std=c99 -pedantic -Wall -Wextra
* Usage: ./disksize /dev/sdX
*/
#include <stdio.h>
#include <inttypes.h>
#include <assert.h>