Skip to content

Instantly share code, notes, and snippets.

View gtxaspec's full-sized avatar
😾
staring at the cat sleep

gtxaspec

😾
staring at the cat sleep
View GitHub Profile
@lulalala
lulalala / ffmpeg_compile.sh
Created October 17, 2013 16:33
compile options for minial ffmpeg which can encode/decode from images to h264
# for x264
./configure --enable-static \
--disable-opencl \
--disable-avs \
--disable-cli \
--disable-ffms \
--disable-gpac \
--disable-lavf \
--disable-swscale \
--prefix=/usr/local/
@staaldraad
staaldraad / huaweiDecrypt.py
Created March 11, 2015 13:19
Decrypt Huawei router/firewall passwords. Huawei stores passwords using DES encryption when the crypted option is enabled.
#!/usr/bin/python
"""
Simple tool to extract local users and passwords from most Huawei routers/firewalls config files.
Will extract plain-text passwords and crypted credentials. Huawei config files use DES encryption with
a known key. Using this information, the script will decrypt credentials found in the config file.
Author: Etienne Stalmans (etienne@sensepost.com)
Version: 1.0 (12/01/2014)
"""
from Crypto.Cipher import DES
@azureru
azureru / extract android kernel.md
Last active February 5, 2026 02:22
How to Extract Android Kernel And Modify The Boot Ramdisk (Android 4.4) on Allwinner based Processor

Extracting Existing Kernel + Ramfs

Enter the machine using adb shell

Run cat /proc/partitions

  #  Path                     Purpose        Size
  0 /dev/block/mmcblk0                       7761920
  1 /dev/block/mmcblk0p1      data           6085631
@tanaikech
tanaikech / submit.md
Last active January 16, 2026 23:37
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@chankruze
chankruze / Compile-Vanila.md
Last active February 5, 2026 12:29
How To Compile OpenWrt Firmware For Any Router

Checking out Source

  • clone latest source repository by git clone https://www.github.com/openwrt/openwrt -b branch_name
  • Now change directory to openwrt by cd openwrt.This is our <buildroot dir> for this guide.

Updating Feeds

  • Update feeds: ./scripts/feeds update -a
  • Make downloaded package(s) available in make menuconfig:
    • single package : ./scripts/feeds install <PACKAGENAME>
    • all packages : ./scripts/feeds install -a

Image Configuration

@diffficult
diffficult / tweaks_x220.md
Last active January 8, 2024 22:10
Thinkpad x220 General Tweaks

Thinkpad x220 general

Power settings (powertop+tlp)

powertop setup

  1. Install powertop
sudo pacman -S powertop
@aka-z
aka-z / live-meta.sh
Created November 9, 2018 02:34 — forked from makoto1984/live-meta.sh
streaming music with generated video to youtube via ffmpeg
#!/bin/sh
# This script is a companion of the script youtube-music-live.sh. Assuming the MUSIC_PATH is an icecast2 stream, The script will fetch the metadata tag StreamTitle every 5 seconds and update the file /tmp/artist, /tmp/title. Generally, the StreamTitle should be like "artist - title", though sometimes there is only title. You may also update the files manually and ignore this script. Be sure to run this script after youtube-music-live.sh.
# You have to define music url.
MUSIC_PATH=
while [ `pgrep -x ffmpeg` ]
do
meta=`ffprobe -v error -show_format "$MUSIC_PATH" | grep StreamTitle | cut -d= -f2`
case "$meta" in
@ppoffice
ppoffice / 01_Android_LXC_Note.md
Last active November 7, 2024 12:48
LXC for Android 9.0.0 r18 Goldfish

Steps to build Android kernel and system for LXC:

  1. Download Android SDK, NDK, system and kernel source code;
  2. Download modified lxc and libcap source code (ppoffiec/lxc-android, ppoffice/libcap-android)
  3. Build Android system from source first so that we can link to its shared library when we build lxc (or maybe we don't have to);
  4. Modify Android kernel config and make sure lxc-checkconfig does not report any missing features. Then build kernel;
  5. Modify Android system/core/rootdir/init.rc according to init.rc.diff. Make sure you mount all the cgroup subsystems needed (cpu, cpuacct, cpuset, memory, pids, devices, freezer, blkio) under /sys/fs/cgruop, otherwise lxc won't find them;
  6. Rebuilt the Android system image so that the modified init.rc is in the image;
  7. Fire up the emulator with custom kernel (emulator -kernel kernel-file-path) and use adb shell and dmesg to check if everything is doing ok.
@hxmuller
hxmuller / program-spi-nor-with-raspi.md
Last active February 3, 2025 17:27
Program the SPI NOR flash on a Pinebook Pro using a Raspberry Pi

Program SPI NOR Flash on Pinebook Pro with a Raspberry Pi

TL;DR: This describes the process, hardware, and software used to perform in-circuit programming of the 128Mbit SPI NOR flash in the Pinebook Pro using a Raspberry Pi.

Warning

You, the user of this information bear ALL responsibility for ANY outcome of its use, whether negative or positive. My success in this operation can be attributed to the following factors:

  • Attention to detail
  • Curiousity
@aacero
aacero / 0TrySome4kVideoModes.sh
Last active August 24, 2022 05:45
How I got 4K video resolution working with an older Intel graphics chipset (Ubuntu 20.04, Samsung U32R59x)
#!/bin/bash
# cvt 2560 1440 30
# xrandr --newmode "2560x1440_30.00" 146.25 2560 2680 2944 3328 1440 1443 1448 1468 -hsync +vsync
# xrandr --addmode HDMI-1 2560x1440_30.00
# xrandr --output HDMI-1 --mode 2560x1440_30.00
# This one is easier on the eyes than 3840x2160 @24Hz:
# cvt -r 2560 1440 60
# 2560x1440 59.95 Hz (CVT 3.69M9-R) hsync: 88.79 kHz; pclk: 241.50 MHz