Skip to content

Instantly share code, notes, and snippets.

View JCash's full-sized avatar
💭
Game devving 24/7

Mathias Westerdahl JCash

💭
Game devving 24/7
View GitHub Profile
[
// Fix End of line
{ "keys": ["ctrl+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} }
,{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "hardeol", "extend": false} }
// Fix Beginning of line
,{ "keys": ["ctrl+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }
,{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }
// Fix end of line + select
,{ "keys": ["ctrl+shift+right"], "command": "move_to", "args": {"to": "hardeol", "extend": true} }
// Fix beginning of line + select
@JCash
JCash / build.yml
Last active March 2, 2020 13:41
Setting up Win32 build pipeline in Docker
x86_64-win32:
env:
TMP: "{{build_folder}}"
TEMP: "{{build_folder}}"
MSVC_DIR: "{{env.WINDOWS_MSVC_2019_DIR}}"
SDK8_DIR: "{{env.WINDOWS_SDK_8_DIR}}"
SDK10_DIR: "{{env.WINDOWS_SDK_10_DIR}}"
SDK10_VERSION: "{{env.WINDOWS_SDK_10_VERSION}}"
VCINSTALLDIR: "{{env.WINDOWS_VCINSTALLDIR}}"
@JCash
JCash / Makefile
Last active October 14, 2024 09:21
How to print the correct, offending callstack
CXXFLAGS := \
-O0 -g -Wall \
-march=native -mtune=native \
-I/usr/local/opt/libunwind-headers/include
ifeq ($(shell uname), Linux)
LDFLAGS := -lunwind
endif
TARGETS := \
@JCash
JCash / README.md
Last active December 29, 2020 18:40
signal handler + test cases (gcc -g test.c) (testing on macOS)

build

$ gcc -g test.c

Types of crashes:

  • TEST_ABORT=1 (calls assert(false))
  • TEST_SEGV=1 (generates a segv)
  • (no test type) (just generates a callstack())
@JCash
JCash / strip_lib.h
Created January 8, 2021 15:52
Unpacks a static library (.a) and strips all the debug symbols, then repacks the library again. Overwrites original file!
#!/bin/bash
# usage: repack.sh file.a
# used on macOS
# Originally from https://stackoverflow.com/a/49632127/468516
if [ -z "$1" ]; then
echo "usage: repack file.a"
exit 1
fi
@JCash
JCash / jcash.zsh-theme
Created May 26, 2022 08:41
Put in ~/.oh-my-zsh/custom/jcash.zsh-theme , Set ZSH_THEME="jcash" in ~ /.zshrc
eval fff='$FG[231]'
eval eee='$FG[252]'
eval ccc='$FG[007]'
eval gray='$FG[237]'
eval orange='$FG[214]'
eval lightorange='$FG[178]'
eval green='$FG[064]'
eval lightgreen='$FG[113]'
eval red='$FG[001]'
eval lightred='$FG[196]'