This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g++ -Wl,--wrap=malloc -Wl,--wrap=free test.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* fs/eventpoll.c (Efficient event retrieval implementation) | |
* Copyright (C) 2001,...,2009 Davide Libenzi | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* Davide Libenzi <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Copyright 2011 The Go Authors. All rights reserved. | |
" Use of this source code is governed by a BSD-style | |
" license that can be found in the LICENSE file. | |
" ~/.vim/syntax/godoc.vim | |
if exists("b:current_syntax") | |
finish | |
endif | |
noremap <buffer> q :q!<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.beyondlogic.org/usbnutshell/usb5.shtml | |
#include <bits/stdc++.h> | |
#include <libusb-1.0/libusb.h> | |
using namespace std; | |
#define PIXELX 1 | |
#define ABORT_ON(ret, msg) \ | |
do { \ | |
if (ret < 0) { \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function e() { | |
set -eu | |
ns=${2-"default"} | |
pod=`kubectl -n $ns describe pod $1 | grep -A10 "^Containers:" | grep -Eo 'docker://.*$' | head -n 1 | sed 's/docker:\/\/\(.*\)$/\1/'` | |
pid=`docker inspect -f {{.State.Pid}} $pod` | |
echo "entering pod netns for $ns/$1" | |
cmd="nsenter -n --target $pid" | |
echo $cmd | |
$cmd | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bcc/proto.h> | |
#include <uapi/linux/ip.h> | |
#include <uapi/linux/ipv6.h> | |
#include <uapi/linux/icmp.h> | |
#include <uapi/linux/tcp.h> | |
#include <uapi/linux/udp.h> | |
#include <uapi/linux/icmpv6.h> | |
#include <net/inet_sock.h> | |
#include <linux/netfilter/x_tables.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: simple-http | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: simple-http | |
template: |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bpftrace | |
#include <linux/skbuff.h> | |
#include <linux/ip.h> | |
BEGIN | |
{ | |
printf("follow the white rabbit\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
OlderNewer