Skip to content

Instantly share code, notes, and snippets.

View ariesdevil's full-sized avatar
💓
never say never

Damon Z ariesdevil

💓
never say never
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ariesdevil on github.
  • I am ariesdevil (https://keybase.io/ariesdevil) on keybase.
  • I have a public key whose fingerprint is 6A4D 9353 CB9F FA5B 3E17 01D2 B201 D8EB 76F9 7C6F

To claim this, I am signing this object:

#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# tcpconnect Trace TCP connect()s.
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: tcpconnect [-h] [-c] [-t] [-p PID] [-P PORT [PORT ...]]
#
# All connection attempts are traced, even if they ultimately fail.
#
@ariesdevil
ariesdevil / sysctl.conf
Created December 11, 2019 11:44 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@ariesdevil
ariesdevil / # gcc@8 - 2019-11-05_00-12-58.txt
Created November 4, 2019 16:23
gcc@8 on macOS 10.15 - Homebrew build logs
Homebrew build logs for gcc@8 on macOS 10.15
Build date: 2019-11-05 00:12:58
@ariesdevil
ariesdevil / function_serialize.cpp
Created October 25, 2019 09:22 — forked from tbenthompson/function_serialize.cpp
Serializing functions in C++
#include <iostream>
#include <sstream>
#include <fstream>
/* Serialize a function by writing out a pointer to its location in memory.
* This will only work between two processes running identical binaries.
*
* One difficulty is ASLR:
* Address space layout randomization (ASLR) puts functions in a different
* place in memory everytime a program is loaded. Within a given binary
@ariesdevil
ariesdevil / README.md
Created July 10, 2019 14:48 — forked from dd-han/README.md
using Cloudflare as DDNS in ASUSWRT-Merlin firmware

ASUSWRT-MERLIN custom DDNS Script for Cloudflare

for Cloudflare as DDNS

using Cloudflare API v4

Using

put ddns-start at /jffs/scripts/, setting values and set DDNS type to Custom at web Admin panel.

@ariesdevil
ariesdevil / ssecheck.cpp
Created April 16, 2019 06:41 — forked from hi2p-perim/ssecheck.cpp
Check SSE/AVX instruction support.
/*
Check SSE/AVX support.
This application can detect the instruction support of
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX.
*/
#include <iostream>
#ifdef _MSC_VER
#include <intrin.h>
#endif
@ariesdevil
ariesdevil / Rationale.md
Created April 1, 2019 04:01 — forked from leegao/Rationale.md
JIT for dummies: JIT compiling RPN in python

If you don't care about the explanation, scroll down to find the code, it's 50 some odd lines and written by someone who doesn't know any better. You have been warned.

What it does

This is a very simple proof of concept jitting RPN calculator implemented in python. Basically, it takes the source code, tokenizes it via whitespace, and asks itself one simple question: am I looking at a number or not?

First, let's talk about the underlying program flow. Pretend that you are a shoe connoisseur with a tiny desk. You may only have two individual shoes on that desk at any one time, but should you ever purchase a new one or get harassed by an unruly shoe salesman without realizing that you have the power to say no (or even maybe?), you can always sweep aside one of the two shoes on the desk (the one on the right, because you're a lefty and you feel that the left side is always superior) onto the messy floor, put the other shoe on the right hand side, and then place your newly acquired shoe in

@ariesdevil
ariesdevil / tmux.md
Created August 22, 2017 06:42 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a