How to look at the stack with gdb


I was chatting with someone yesterday and they mentioned that they don’t really understand exactly how the stack works or how to look at it. So here’s a quick walkthrough of how you can use gdb to look at the stack of a C program. I think this would be similar for a Rust program, but I’m going to use C because I find it a little simpler for a toy example and also you can do Terrible Things in C more easily.…
Read more ⟶

Building cgit on macOS


Checkout and init the submodule. git clone git://git.zx2c4.com/cgit cd cgit git submodule init git submodule update Install gettext through brew. brew install gettext Then create a cgit.conf file and set complier/linker flags to use the gettext library installed before. CFLAGS = -g -O2 -Wall -I/usr/local/opt/gettext/include LDFLAGS = -L/usr/local/opt/gettext/lib Finish up with a simple make command. make…
Read more ⟶

Vim Cheat Sheet


A Great Vim Cheat Sheet Essentials Cursor movement (Normal/Visual Mode) h j k l - Arrow keys w / b - Next/previous word W / B - Next/previous word (space seperated) e / ge - Next/previous end of word 0 / $ - Start/End of line ^ - First non-blank character of line (same as 0w) Editing text i / a - Start insert mode at/after cursor I / A - Start insert mode at the beginning/end of the line o / O - Add blank line below/above current line Esc or Ctrl+[ - Exit insert mode d - Delete dd - Delete line c - Delete, then start insert mode cc - Delete line, then start insert mode Operators Operators also work in Visual Mode…
Read more ⟶

去掉doc88,360doc,csdn和sfgg的登陆后复制限制


各大站都搞这个登陆复制,真的恶心, 尤其是csdn,各种和谐, 虽然有命令,但是每次敲都贼麻烦, 来个油猴脚本吧~~ /* eslint-disable no-undef */ /* eslint-disable no-eval */ // ==UserScript== // @name 去掉d…
Read more ⟶

win10 笔记本 同时接入无线(外网)和有线(内网)


连接内网和无线网络 内网和外网都不要禁止,win10系统,以管理员身份运行CMD,在CMD中输入route print IPv4 路由表 上面一行是外网,下面一行是…
Read more ⟶

网络字体包压缩优化方案


本文将介绍如何缩小网络字体包大小及优化其加载过程。 优化思路 将字体包转换为 woff2 格式。它具有更小的体积,对现代浏览器非常友好,且无需再 gzip 压缩。 使字…
Read more ⟶

[solved]modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='off'


exute sudo modprobe nvidia error: modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name=‘off’ 02615-oak8kunndy9.png Nvidia对他们的安装做了一些改动。 现在,Nvidia库位于/usr/lib/x86_-…
Read more ⟶

gitExtension 合并与衍合


注意到:以下的操作主要是用gitExtension来操作的。 gitExtension配置教程:http://www.cnblogs.com/…
Read more ⟶

[solved] mpv mpv: relocation error: /usr/lib/x86_64-linux-gnu/libldb.so.1:


最近 mpv 突然打不开,终端运行提示 libtalloc 版本有问题。 使用终端运行错误提示如下 $ mpvmpv: relocation error: /usr/lib/x86_64-linux-gnu/libldb.so.1: symbol talloc_strdup_append_buffer version TALLOC_2.0.2 not defined in file libtalloc.so.2 with link time reference 解决: sudo apt-get install --reinstall libtevent0 libtalloc2…
Read more ⟶

[解决]java jdk11,发现安装路径没有jre文件夹


安装jre,需要到jdk目录下面去 在此处打开命令窗口,执行如下命令: 52006-bww8u0li4s.png bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre 执行完之后就会生成jre啦…
Read more ⟶