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
| 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
| 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
| / 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
| %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
| #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
| class RRPartitionerCb : public RdKafka::PartitionerCb { | |
| public: | |
| RRPartitionerCb() { partition = 0; } | |
| int32_t partitioner_cb(const RdKafka::Topic *topic, | |
| const std::string *key, | |
| int32_t partition_cnt, | |
| void *msg_opaque) { | |
| if((partition+1) > (partition_cnt-1)) { | |
| partition = 0; | |
| return partition; |
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
| Name: jemalloc | |
| Version: 5.1.0 | |
| Release: 3%{?dist} | |
| Summary: General-purpose scalable concurrent malloc implementation | |
| Group: System Environment/Libraries | |
| License: BSD | |
| URL: http://www.canonware.com/jemalloc/ | |
| Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 |
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
| Name: jemalloc | |
| Version: 5.1.0 | |
| Release: 3%{?dist} | |
| Summary: General-purpose scalable concurrent malloc implementation | |
| Group: System Environment/Libraries | |
| License: BSD | |
| URL: http://www.canonware.com/jemalloc/ | |
| Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 |
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 ( | |
| "os" | |
| "fmt" | |
| "github.com/bluele/slack" | |
| ) | |
| var ( | |
| Version string | |
| Build string |