Skip to content

Instantly share code, notes, and snippets.

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-commentary'
Plugin 'itchyny/lightline.vim'
@DanielTimLee
DanielTimLee / tmux-notify.pl
Created November 29, 2021 11:01 — forked from basilfx/tmux-notify.pl
Irssi and tmux-notify
use strict;
use warnings;
use vars qw($VERSION %IRSSI);
use Irssi;
# Script info
$VERSION = '0.1';
%IRSSI = (
authors => 'Bas Stottelaar',
@DanielTimLee
DanielTimLee / uftrace_kernel_filter_Error.log
Created June 15, 2020 07:41
uftrace_kernel_filter_Error_log
kernel: writing '1' to tracing/tracing_on
kernel: writing 'nop' to tracing/current_tracer
kernel: writing 'local' to tracing/trace_clock
kernel: writing ' ' to tracing/set_ftrace_pid
kernel: writing ' ' to tracing/set_graph_function
kernel: writing ' ' to tracing/set_event_pid
kernel: writing ' ' to tracing/set_graph_notrace
kernel: writing '0' to tracing/options/event-fork
kernel: writing '0' to tracing/options/function-fork
kernel: writing ' ' to tracing/set_ftrace_filter
@DanielTimLee
DanielTimLee / qemu-s390x-debian-rules.patch
Created May 14, 2020 13:17 — forked from paboldin/qemu-s390x-debian-rules.patch
qemu-system-s390x emulator on Ubuntu how-to
--- qemu-2.5+dfsg/debian/rules 2016-04-19 18:48:46.000000000 +0300
+++ qemu-2.5+dfsg.new/debian/rules 2017-07-25 23:38:18.882758751 +0300
@@ -132,9 +132,13 @@ ifeq ($(enable_linux_user),enable)
$(MAKE) -C user-static-build V=${V} $(foreach t,${user_targets},subdir-${t}-linux-user)
endif
-ifneq ($(filter $(DEB_HOST_ARCH),s390 s390x),)
- $(MAKE) -C qemu-build/pc-bios/s390-ccw V=${V}
-endif
+#ifneq ($(filter $(DEB_HOST_ARCH),s390 s390x),)
@DanielTimLee
DanielTimLee / README.md
Created January 13, 2020 08:02 — forked from fntlnz/README.md
Seccomp bpf filter example

Seccomp BPF filter example

Use bpf programs as filters for seccomp, the one in the example will block all the write syscalls after it's loaded.

Usage

Compile it with just

gcc main.c
@DanielTimLee
DanielTimLee / vimium-emacs.md
Created December 6, 2019 12:52 — forked from dmgerman/vimium-emacs.md
Emacs-Style Key Bindings for Vimium

My Vimium Key Bindings (Emacs-Style)

This is a full set of key bindings (as of Vimium v1.45); covering all Vimium functionality. I have tried to map all Vimium functionality to comparable Emacs functionality (whenever possible). In cases where there is no equivalent, those commands are prefixed by <c-g> (indicating <c-g>oogle Chrome; and because <c-g> does not conflict with other Emacs shortcuts at all).

Commented Shortcuts: There are a few Emacs-style shortcuts that are simply not possible in Vimium. All of my shortcuts (including those which were not possible; i.e. where I used a decent alternative) have been commented below. This should help to clarify my rationale.

_Compatibility: All of these shortcuts were tested on Mac OS X (Mavericks). Please note that all of my shortcuts operate under the assumption that your Emacs Meta key is the Alt/Option key. This really was my only choice, because the key is already used in Chrome for shortcuts that c

@DanielTimLee
DanielTimLee / TC.md
Created October 15, 2019 12:02
[TC] Notes about TC filter
@DanielTimLee
DanielTimLee / gist:f432b7d362e948fa06a7a6a0b3740b74
Created September 19, 2019 15:20 — forked from dtroyer/gist:a065b77ebe0443659898
Test traps, errexit, errtrace
#!/bin/bash
# Do some errexit testing
# 0 - test success
# 1 - test simple fail
# 2 - test function fail
#
# in function
# N errexit errtrace pass?
@DanielTimLee
DanielTimLee / install_elfutils.sh
Created June 13, 2019 11:34
install latest elfutils script. forked from uftrace project.
#!/bin/bash
#-*- mode: shell-script; -*-
prefix=/usr/local
objdir=$(readlink -f ${objdir:-${PWD}})
builddir=${objdir}/.build
n_cpus=$(grep -c ^processor /proc/cpuinfo)
@DanielTimLee
DanielTimLee / pritunl_journal.log
Created April 30, 2019 13:03
Pritunl error due to selinux domain_can_mmap_files boolean
pritunl[7643]: [patient-thunder-3756][2019-04-30 21:31:06,543][INFO] Starting server
pritunl[7643]: selinux_context = "system_u:system_r:pritunl_t:s0"
pritunl[7643]: [patient-thunder-3756][2019-04-30 21:52:49,682][ERROR] Failed to get IPv6 routes
pritunl[7643]: Traceback (most recent call last):
pritunl[7643]: File "/usr/lib/pritunl/lib/python2.7/site-packages/pritunl/setup/ndppd.py", line 24, in _default_interface_thread
pritunl[7643]: ['route', '-n', '-A', 'inet6'])
pritunl[7643]: File "/usr/lib/pritunl/lib/python2.7/site-packages/pritunl/utils/misc.py", line 224, in check_output_logged
pritunl[7643]: return_code, cmd, output=stdoutdata)
pri