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
#!/usr/bin/env bash | |
# dependencies: | |
# https://www.npmjs.com/package/chrome-web-store-item-property-cli | |
# https://stedolan.github.io/jq/ | |
# curl | |
# Ascertain directory in which script lives; compatible with all UNIX | |
# Thanks to kenorb | |
# http://stackoverflow.com/a/17744637/5257399 |
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
#!/usr/bin/python | |
# | |
#Bertrone Matteo - Polytechnic of Turin | |
#November 2015 | |
# | |
#Additions made by Alex Birch, July 2018 | |
#to correlate HTTP reply back to HTTP request, and accumulate & print statistics | |
# | |
#eBPF application that parses HTTP packets | |
#and extracts (and prints on screen) the URL contained in the GET/POST request. |
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
#!/usr/bin/python | |
# | |
# Forked from https://github.com/iovisor/bcc/blob/master/examples/networking/http_filter/http-parse-complete.py | |
# I've removed almost all functionality. It now simply prints the sequence number of every packet submitted, and does not perform any cleanup. | |
# ===== | |
#Bertrone Matteo - Polytechnic of Turin | |
#November 2015 | |
# | |
#eBPF application that parses HTTP packets | |
#and extracts (and prints on screen) the URL contained in the GET/POST request. |
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
#!/usr/bin/python | |
# invoke with: | |
# sudo ./http-minimal.py -i docker0 | |
from bcc import BPF | |
from sys import argv | |
import socket | |
import os |
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/sh | |
# mounts a host named 'mycoolhost' (as described in SSH config): | |
# ./sshfs_mount.sh | |
# unmount: | |
# ./sshfs_mount.sh 0 | |
REMOTE_HOST='mycoolhost' | |
REMOTE_DIR='/home/mycooluser' | |
VOLNAME="$REMOTE_HOST" |
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 <stdio.h> | |
#include <inttypes.h> | |
int main(int argc, char** argv) { | |
uint64_t val = (1ULL<<29) -1ULL; | |
printf("0x%" PRIx64 "\n", val); | |
return 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 Pluck( ctx ) { | |
this.sr = ctx.sampleRate; | |
this.pro = ctx.createScriptProcessor( 512, 0, 1 ); | |
this.pro.connect( ctx.destination ); | |
} | |
Pluck.prototype.play = function( freq ) { | |
var N = Math.round( this.sr / freq ), | |
impulse = this.sr / 1000, | |
y = new Float32Array( 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
sudo ./src/bpftrace -v -e 'struct F {char s[5];} u:./tests/testprogs/string_args:print { $a = ((struct F*)arg0)->s; }' -c ./tests/testprogs/string_args | |
0: (bf) r6 = r1 | |
1: (79) r3 = *(u64 *)(r6 +112) | |
2: (bf) r1 = r10 | |
3: (07) r1 += -29 | |
4: (b7) r2 = 5 | |
5: (85) call bpf_probe_read#4 | |
last_idx 5 first_idx 0 | |
regs=4 stack=0 before 4: (b7) r2 = 5 |
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
; ModuleID = 'bpftrace' | |
source_filename = "bpftrace" | |
target datalayout = "e-m:e-p:64:64-i64:64-n32:64-S128" | |
target triple = "bpf-pc-linux" | |
%helper_error_t = type <{ i64, i64, i32, i8 }> | |
; Function Attrs: nounwind | |
declare i64 @llvm.bpf.pseudo(i64, i64) #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
#69 12.76 In file included from /linux_native/include/JUCE-6.1.5/modules/juce_audio_plugin_client/juce_audio_plugin_client_utils.cpp:26: | |
#69 12.76 /linux_native/include/JUCE-6.1.5/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp:27:11: warning: non-portable path to file '<Windows.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path] | |
#69 12.76 #include <windows.h> | |
#69 12.76 ^~~~~~~~~~~ | |
#69 12.76 <Windows.h> | |
#69 12.77 In file included from /linux_native/include/JUCE-6.1.5/modules/juce_audio_plugin_client/juce_audio_plugin_client_utils.cpp:26: | |
#69 12.77 In file included from /linux_native/include/JUCE-6.1.5/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp:27: | |
#69 12.77 In file included from /xwin/sdk/include/um/windows.h:171: | |
#69 12.77 In file included from /xwin/sdk/include/shared/windef.h:24: | |
#69 12.77 In file included from /xwin/sdk/include/shared/minwindef.h:182: |