This file contains hidden or 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 <signal.h> | |
| #include <sys/time.h> | |
| static volatile sig_atomic_t g_called; | |
| void g(int sig) | |
| { | |
| g_called += 1; | |
| printf("g called - %d times\n", g_called); |
This file contains hidden or 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
| %extern{ | |
| #include <stdio.h> | |
| #include <iostream> | |
| #include <iomanip> | |
| #include <sstream> | |
| %} | |
| function dump_message(msg: const_bytestring): bool | |
| %{ | |
| int i; |
This file contains hidden or 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
| / Aaron Eppert - 2017 | |
| // golang wrapper around libkmod with lsmod as an example | |
| // | |
| package main | |
| /* | |
| #cgo pkg-config: libkmod | |
| #include <libkmod.h> | |
| */ | |
| import "C" |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| ) | |
| func UtsArrayToStr(in []int8) string { | |
| i, out := 0, make([]byte, 0, len(in)) | |
| for ; i < len(in); i++ { |
This file contains hidden or 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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net" | |
| ) | |
| type netifs struct { | |
| Addrs []string |
This file contains hidden or 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 <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <iostream> | |
| #include <unistd.h> | |
| #include <boost/thread.hpp> | |
| #include <sys/mman.h> | |
| #include <poll.h> | |
| #include <arpa/inet.h> |
This file contains hidden or 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 <vector> | |
| #include <iostream> | |
| #include <map> | |
| #include <functional> | |
| #include <numeric> | |
| using namespace std; | |
| #define VIN_LEN 17 | |
| #define VIN_CHECKDIGIT_POS 8 |
This file contains hidden or 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 <stdlib.h> | |
| #include <cxxabi.h> | |
| #include <link.h> | |
| #include <string> | |
| #include <vector> | |
| #include <iostream> | |
| using namespace std; |
This file contains hidden or 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
| set theApp to "Chrome" | |
| set appHeight to 720 | |
| set appWidth to 1280 | |
| tell application "Finder" | |
| set screenResolution to bounds of window of desktop | |
| end tell | |
| set screenWidth to item 3 of screenResolution | |
| set screenHeight to item 4 of screenResolution |
This file contains hidden or 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/bash | |
| for i in `find . -type f -name "$1"` | |
| do | |
| mv $i $i.pcap | |
| tshark -r $i.pcap -q -z io,phs > $i-summary.txt | |
| done |