Skip to content

Instantly share code, notes, and snippets.

@efr2et
efr2et / obsidian-docx.md
Created December 3, 2024 15:52 — forked from HarshitRuwali/obsidian-docx.md
Export Obsidian/Markdown notes to docx

Firstly use obsidian-export to export the Obsidian Vault/Notes to regular markdown files.

Once after exporting in the regular markdown format use the following script to convert the markdown to docx. This will require Pandoc.

pandoc md-file.md \
-o out-docx-file.docx \
--from markdown+yaml_metadata_block+raw_html \
--top-level-division=chapter
@efr2et
efr2et / ffmpeg-nox11-build.sh
Last active May 8, 2024 14:44 — forked from peerasan/ffmpeg-build.sh
Build FFmpeg
# Watch video: https://youtu.be/qLw6ZWUXy7U
#Require for Compiler
#apt-get install -y autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev
sudo apt-get update -qq && sudo apt-get -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libtool libvorbis-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm
#Require for FFmpeg
sudo apt-get install libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev libaom-dev libsvtav1-dev libsvtav1enc-dev libunistring-dev libvmaf libdav1d-dev
mkdir ~/ffmpeg_sources
@efr2et
efr2et / split_tunnel_VPN.md
Created April 30, 2024 13:04 — forked from GAS85/split_tunnel_VPN.md
Force Torrent/user Traffic through VPN Split Tunnel on Ubuntu 16.04
@efr2et
efr2et / smartd-telegram-notify.md
Created January 4, 2024 15:27 — forked from te-online/smartd-telegram-notify.md
How to make smartmontools send errors to you via Telegram messenger.

###Step by step

Installing smartmontools

  1. Install smartmontools with sudo apt-get install smartmontools

Create your new bot

  1. Create a new telegram bot via the botfather (see https://core.telegram.org/bots#3-how-do-i-create-a-bot). You will need the token of the bot from botfather.
  2. Initiate a chat with your new bot.
  3. Send a GET to https://api.telegram.org/bot{YOUR_TOKEN}/getUpdates.

PWM fan control in Linux with a Gigabyte Aorus motherboard

  • install lm-sensors with your package manager

sensors

If it won't show any fan/speed, continue

sensor-detect

@efr2et
efr2et / android-backup-apk-and-datas.md
Created September 7, 2023 15:04 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

@efr2et
efr2et / release-android-debuggable.md
Created September 7, 2023 14:23 — forked from nstarke/release-android-debuggable.md
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@efr2et
efr2et / prune_old_vols.sh
Created August 28, 2023 11:11 — forked from starkers/prune_old_vols.sh
prune delete and remove old bacula volumes
#!/usr/bin/env bash
#set -x
# Prune and volumes older than 2 months:
PAST=`date --date='-2 months 0 day ago' +%Y-%m-%d`
#EG a hard coded date
#PAST="2012-11-29"
#PAST="2013-11-29"
@efr2et
efr2et / stress-with-curl.sh
Created June 19, 2023 18:50 — forked from ktsaou/stress-with-curl.sh
Command line web server stress testing tool, implemented with curl and real-time statistics to netdata
#!/usr/bin/env bash
# Stress With Curl
# Run multiple curl worker to stress a web server
# Real-time statistics at a Netdata server
#
# To use, you need:
# - curl
# - The nc command from the openbsd-netcat package
# - Netdata
@efr2et
efr2et / _trace.py
Created May 16, 2023 11:11 — forked from numberoverzero/_trace.py
add TRACE level to python logging
import logging
_trace_installed = False
def install_trace_logger():
global _trace_installed
if _trace_installed:
return
level = logging.TRACE = logging.DEBUG - 5