Skip to content

Instantly share code, notes, and snippets.

View fetiu's full-sized avatar

Jake Jooncheol Kim fetiu

View GitHub Profile
@gyng
gyng / a.md
Last active March 16, 2023 08:19
Awair Grafana dashboard

https://i.imgur.com/mPgtdla.png

@sorny
sorny / x11_forwarding_macos_docker.md
Last active June 18, 2024 12:50
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)
  • Macbook Pro (Intel)
@colematt
colematt / .Adding-Sections-to-Elf-Binaries.md
Last active March 1, 2024 20:04
[Add a section to an ELF binary] #llvm

Adding Sections to ELF Binaries

Suppose you need to add a section to an ELF binary to contain information gathered at compile time, but to be used at link time or run time. Here's how to add a section named .okdata and either populate it with data either after or before emitting the ELF binary.

Adding a Section After Emitting

In this case, you'll add file’s contents to an already existing binary. objcopy copies and translates object files, such that adding a new section is a matter of writing that new section’s contents into the ELF file.

(Optional) Create a simple program’s object file.

@davidtibbetts
davidtibbetts / tasks.json
Last active July 28, 2021 04:47
OpenOCD launch for VSCode
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"options": {
"env": {
"OPENOCD_SCRIPTS": "${workspaceRoot}\\..\\OpenOCD-20170609\\share\\openocd\\scripts"
}
},
"tasks": [
@480
480 / gist:4681b67d2a906db8c6c1321cc678f05f
Last active February 24, 2024 05:24
github 리모트 리포지토리 변경하기

깃 리모트 변경 하기

기존 리포지토리 깔끔하게 pull / push

git pull
git add .
git commit -m "clean push"
git push
@arslancharyev31
arslancharyev31 / C_v1.bnf
Created October 14, 2017 15:32
C .bnf grammar. Version 1.
{
tokens=[
space='regexp:\s+'
identifier='regexp:[a-zA-Z][a-zA-Z0-9_]*'
integer-constant='regexp:\d+'
character-constant='regexp:[a-zA-Z]'
floating-constant='regexp:[+-]?([0-9]*[.])?[0-9]+f'
enumeration-constant='regexp:[a-zA-Z][a-zA-Z0-9_]*' // Same as identifier
]
@cschiewek
cschiewek / x11_docker_mac.md
Last active June 21, 2024 09:14
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@wojteklu
wojteklu / clean_code.md
Last active June 20, 2024 21:37
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@austinglaser
austinglaser / gcov_project.yml
Created July 17, 2016 21:41
Basic configuration for Ceedling using the gcov plugin
---
# Notes:
# Sample project C code is not presently written to produce a release artifact.
# As such, release build options are disabled.
# This sample, therefore, only demonstrates running a collection of unit tests.
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE