Skip to content

Instantly share code, notes, and snippets.

View zulonas's full-sized avatar

Kasparas Zulonas zulonas

View GitHub Profile
@zulonas
zulonas / hexdump.lua
Created October 5, 2022 14:09
hex dump for lua
local function hex_dump(buf)
for byte=1, #buf, 16 do
local chunk = buf:sub(byte, byte + 15)
io.write(string.format('%08X ', byte - 1))
chunk:gsub('.', function (c) io.write(string.format('%02X ', string.byte(c))) end)
io.write(string.rep(' ', 3 * (16 - #chunk)))
io.write(' ', chunk:gsub('%c', '.'), "\n")
end
end
@rikka0w0
rikka0w0 / licheepi_nano_squashed_rw_root.md
Last active July 20, 2023 13:47
SquashFS + JFFS2 root on LicheePi Nano

In order to save space on the SPI flash, SquashFS + JFFS2 should be used.

SPI Flash structure

Partition	Content		Offset		Size (byte)
mtd0		uboot-bin	0		0x58000 (360448)
		uboot-env	0x58000		0x8000
mtd1		dtb		0x60000		0x4000  (16kB)
mtd2		kernel		0x64000		0x400000 (4MB)
mtd3 rootfs 0x464000	0x4FC000 (4.98MB)
@bradtraversy
bradtraversy / docker-help.md
Last active July 9, 2024 10:18
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

/**********************************************
*
* This simple library is used to redirect
* functions like printf(), scanf(), putchar()
* among other to the UART output on the STM32
* using HAL.
*
* Credits to the book Mastering STM32
* File by Benjamin Calderon 2017
*
@glegrain
glegrain / uart.c
Last active March 26, 2024 23:29
STM32 printf retarget to UART
/*# 1- Identify the UART interface, GPIO pins and Alternate Function #########*/
/* For example:
* B-L475E-IOT01A:
* PB6 ------> USART1_TX
* PB7 ------> USART1_RX
*
* NUCLEO-L476RG:
* PA2 ------> USART2_TX
* PA3 ------> USART2_RX
*
@clarketm
clarketm / google-dorks
Created January 30, 2017 10:01 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@terbo
terbo / apls
Last active January 5, 2022 11:20
list wireless clients connected to hostapd access point
#!/usr/bin/python
#
# read /var/run/hostapd for interfaces to poll
# read process list to find list of running hostapds (or get from hostapd_cli)
# get mac address, connected time, transmitted packets
# read arp table
# match arp address to ip address
# print matches
# rinse repeat
@tegila
tegila / sim900.mdown
Last active November 2, 2023 09:55
SIM900 TIPS AND TRICKS

TUTORIAL

Attach to GPRS Service

-> AT+CGATT = 1
<- OK

Define PDP Context (cid, PDP type, APN)

-&gt; AT+CGDCONT=1,"IP","zap.vivo.com.br"
@willpatera
willpatera / Google-Sheet-Form-Post.md
Last active May 3, 2024 12:57
Post to google spreadsheet from html form

Overview

This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form> following the example by Martin Hawksey

Depreciation Warning: This code is not maintained, and should be seen as reference implementation only. If you're looking to add features or update, fork the code and update as needed.

Run example

You should be able to just open index.html in your browser and test locally.

@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube