Skip to content

Instantly share code, notes, and snippets.

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 23, 2024 12:17
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 31, 2024 12:46
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active May 28, 2024 19:14
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@joaomoreno
joaomoreno / README.md
Last active February 1, 2024 22:19
VS Code Insiders Updater for Linux

VS Code Insiders Updater for Linux

This script will download and replace ~/Applications/VSCode-linux-x64 with the latest VS Code Insiders.

gif

Install

  1. Install jq: https://stedolan.github.io/jq/download/
  2. Place update-code somewhere in your PATH
@muff-in
muff-in / resources.md
Last active May 30, 2024 06:00
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources
@boarchuz
boarchuz / esp_rtc_reset.c
Last active January 19, 2022 17:40
ESP32 RTC Reset
#include "soc/rtc_cntl_struct.h"
#include "hal/wdt_types.h"
#include "hal/rwdt_ll.h"
void __attribute__((noreturn)) esp_rtc_reset(void)
{
rwdt_ll_write_protect_disable(&RTCCNTL);
rwdt_ll_disable(&RTCCNTL);
rwdt_ll_config_stage(&RTCCNTL, WDT_STAGE0, 0, WDT_STAGE_ACTION_RESET_RTC);
rwdt_ll_disable_stage(&RTCCNTL, WDT_STAGE1);
@Chubek
Chubek / README.md
Last active May 31, 2023 13:46
Tools to Mix C and Assembly

This gist contains C preprocessor files to mix C and Assembly easier.

  • syscnr.inc includes all the Linux system call numbers.
  • registers.inc includes all the Linux ABI registers for both C and system calls. Arguments start at 0.
  • syscall.inc includes macros for syscalls based on argument number.

Please do not remove the newline at the end of each file. Head to my Github profile where you will find a lot of goodies, a lot of projects and the such and so. My project Panah has some good Assembly code mixed with C.

Enjoy.