Instantly share code, notes, and snippets.

🤘
Awesome

# Lincoln Wallace locnnil

🤘
Awesome
• Minas Gerais State, Brazil
• 02:27 (UTC -03:00)
Created September 9, 2021 02:26 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

`:bowtie:` 😄 `:smile:` 😆 `:laughing:`
😊 `:blush:` 😃 `:smiley:` ☺️ `:relaxed:`
😏 `:smirk:` 😍 `:heart_eyes:` 😘 `:kissing_heart:`
😚 `:kissing_closed_eyes:` 😳 `:flushed:` 😌 `:relieved:`
😆 `:satisfied:` 😁 `:grin:` 😉 `:wink:`
😜 `:stuck_out_tongue_winking_eye:` 😝 `:stuck_out_tongue_closed_eyes:` 😀 `:grinning:`
😗 `:kissing:` 😙 `:kissing_smiling_eyes:` 😛 `:stuck_out_tongue:`
Last active February 16, 2022 13:42
Define the size of an array in C

# The size of a Array in C

• Using sizeof:
```int a[17];
size_t n = sizeof(a) / sizeof(a[0]);```
• Using a Macro function
`#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))`
Last active February 9, 2022 12:17
Necessary CRC type

# Calculate the necessary CRC type

Beeing `B` the number of bytes of your message the necessary numbers necessary in your CRC gonna be:

`N >= ln(8*B+1)/ln(2) -1`

This formula cames from the manipulation of the formula `B = (2**(N+1) -1)/8`

OBS: rembering that only exists CRC8, CRC16 and CRC32 (until now)

Created February 14, 2022 00:30 — forked from Yousha/.gitignore
.gitignore for C/C++ developers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 cmake-3.19.4/* ##### Windows # Windows thumbnail cache files Thumbs.db Thumbs.db:encryptable ehthumbs.db ehthumbs_vista.db # Dump file *.stackdump
Created October 10, 2022 18:12
Cmake Toolchain for ARMv7l architecture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # CMake toolchain file for building ARM software on OI environment # Processor SET(CMAKE_SYSTEM_PROCESSOR arm) # this one is important SET(CMAKE_SYSTEM_NAME Linux) #this one not so much SET(CMAKE_SYSTEM_VERSION 1) # (OPTIONAL) specify some CPU flags
Created October 21, 2022 02:21
A basic CMakeLists.txt template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 cmake_minimum_required(VERSION 3.22) SET(CMAKE_C_STANDARD 11) SET(CMAKE_CXX_STANDARD 20) project(template) SET(CMAKE_CXX_FLAGS "\${CMAKE_CXX_FLAGS} -Wall -Wno-unused-variable -Werror -Wfatal-errors ") SET(CMAKE_C_FLAGS "\${CMAKE_C_FLAGS} -Wall -Wno-unused-variable -Werror -Wfatal-errors")
Created November 10, 2022 20:18 — forked from Anubisss/README.md
How to compile statically linked OpenVPN client for ARMv5

# How to compile statically linked OpenVPN client for ARMv5

You need to install ARMv5 gcc cross compiler: `apt-get install gcc-arm-linux-gnueabi`

You have to define a directory (via --prefix) where all of your binaries will be installed (copied). In the guide I use the following: /home/user/vpn_compile

### OpenSSL

1. Download the source: `wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz`
Created July 9, 2023 17:24
Boot log of ZTE ZXHN F660 router
```BOOT MODE: NAND
ddr init

U-Boot 2013.04 (Oct 11 2016 - 11:22:42)

CPU:   Cortex-A9 400 MHz
AHB:   100 MHz
APB:   50 MHz```
Last active July 19, 2023 23:45
Install docker on server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/bin/bash ## This is a simple script to update ## all packages of a server and ## install docker all in one shot. ## Enjoy! :D sudo apt-get update && sudo apt-get upgrade -y for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove \$pkg; done
Last active July 21, 2023 18:19
Golang updater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/bin/bash set -e help() { echo -e "\${COLOR['RED']}Usage: sudo \$(basename "\$0") \${COLOR['END']}" echo -e "\${COLOR['RED']}Options: \${COLOR['END']}" echo -e "\${COLOR['RED']} , The version of GO in format: MAJOR.MINOR.PATCH.\${COLOR['END']}" echo -e "\${COLOR['RED']} example: sudo \$(basename "\$0") 1.20.6 \${COLOR['END']}" echo -e "\${COLOR['RED']} , The CPU arch (default amd64) \${COLOR['END']}"