Skip to content

Instantly share code, notes, and snippets.

View Kungergely's full-sized avatar

Gergely Kún Kungergely

  • Bratislava, Slovakia
View GitHub Profile
@midudev
midudev / README.md
Created October 15, 2022 17:52
Transcribe vídeo de YouTube con Whisper e Inteligencia Artificial

Requisitos

Necesitas tener instalado Python 3.9 e instalar la dependencia de Whisper y PyTube:

pip install git+https://github.com/openai/whisper.git
pip install pytube

También necesitas tener instalado ffmpeg. Según tu sistema operativo se instala de esta forma:

# https://cardwerk.com/smart-card-standard-iso7816-4-section-6-basic-interindustry-commands/
alhafoudh@Gray:~/Projects/evrc$ opensc-explorer
OpenSC Explorer version 0.22.0
Using reader with a card: Gemalto PC Twin Reader
unable to change lifecycle: Security status not satisfied
OpenSC [3F00]> cd aid:A0000004564556522D3031
OpenSC [A000/0004/5645/5652/2D30/31]> find D000 D0FF
@jarun
jarun / disassemble.md
Last active April 22, 2025 06:39
Guide to disassemble

prerequisites

  • Compile the program in gcc with debug symbols enabled (-g)
  • Do NOT strip the binary
  • To generate assembly code using gcc use the -S option: gcc -S hello.c

utilities

objdump

start xming

Xming -multiwindow -clipboard
export DISPLAY=localhost:0
#ssh username@server -Y
@linuxwizard
linuxwizard / MegaCli-Check.sh
Created May 26, 2017 02:47
Simple RAID status check script for LSI MegaRAID cards
# Simple RAID status check script for LSI MegaRAID cards
# Needs MegaCli installed. Install from https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
# Requires sendmail installed
# Create a cron job for auto checks
# Output format
# Degraded 1
# Failed 1
#!/bin/bash
STATUS=`MegaCli -AdpAllInfo -aALL -NoLog|egrep '^ (Degraded|Failed)'|grep -v ' 0'`;
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#define BUFSIZE (1023 * 1024 * 4)
#define HISTSIZE (0x7f - ' ')
typedef struct hist_entry_s {
uint64_t count;
char codepoint;
@bruceh48
bruceh48 / gist:b5c67f6db6e4ee161ed6364a97c81d9f
Created April 15, 2017 08:26
Compile and install WGRIB2
#!/bin/bash
apt-get update
apt-get install -y build-essential libaec-dev zlib1g-dev libcurl4-openssl-dev libboost-dev curl wget zip unzip bzip2 gfortran gcc g++
rm -rf /usr/local/grib2/
mkdir -p /usr/local/grib2/
cd /code/
if [ ! -f "/tmp/wgrib2.tgz" ]; then
wget ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz.v2.0.6c -O /tmp/wgrib2.tgz
fi
tar -xf /tmp/wgrib2.tgz
@silverkorn
silverkorn / ffmpeg-nonfree-build-ubuntu-16.04.sh
Last active April 23, 2024 19:02
An automated script to build FFmpeg non-free on Debian/Ubuntu with as much features as possible. (Including mediainfo for debugging) Raw
# TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb)
###################
## Configuration ##
###################
FFMPEG_CPU_COUNT=$(nproc)
FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype"
FFMPEG_HOME=/usr/local/src/ffmpeg
@averagesecurityguy
averagesecurityguy / pdf_flatedecode.py
Last active October 2, 2024 19:10
Decompress FlateDecode Objects in PDF
#!/usr/bin/env python3
# This script is designed to do one thing and one thing only. It will find each
# of the FlateDecode streams in a PDF document using a regular expression,
# unzip them, and print out the unzipped data. You can do the same in any
# programming language you choose.
#
# This is NOT a generic PDF decoder, if you need a generic PDF decoder, please
# take a look at pdf-parser by Didier Stevens, which is included in Kali linux.
# https://tools.kali.org/forensics/pdf-parser.
#

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.

Important

  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.