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
module sample | |
go 1.22.1 |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/mattn/go-shellwords" | |
"github.com/peterh/liner" | |
) |
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 "websocket-client.h" | |
#include <iostream> | |
using websocketpp::lib::placeholders::_1; | |
using websocketpp::lib::placeholders::_2; | |
using websocketpp::lib::bind; | |
WebSocketClient::WebSocketClient(std::string uri) { | |
mUri = uri; |
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
func carray2slice(array *C.int, len int) []C.int { | |
var list []C.int | |
sliceHeader := (*reflect.SliceHeader)((unsafe.Pointer(&list))) | |
sliceHeader.Cap = len | |
sliceHeader.Len = len | |
sliceHeader.Data = uintptr(unsafe.Pointer(array)) | |
return list | |
} |
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 <libunwind.h> | |
#include <libunwind-ptrace.h> | |
#include "backtrace.h" | |
#define MAX_BACKTRACE_FRAMES 64 | |
void unwind(pid_t pid) { | |
unw_addr_space_t addr_space = NULL; | |
struct UPT_info* upt_info = NULL; |
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
int T::method() { | |
return 0; | |
} | |
// static member function | |
void *T::threadStart(void *obj) { | |
int ret; | |
T *me = reinterpret_cast<T *>(obj); | |
ret = me->method(); | |
return (void *)ret; |
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
package main | |
import "github.com/gorilla/websocket" | |
type client struct { | |
socket *websocket.Conn | |
room *room | |
send chan []byte | |
} |
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
{ | |
"editor.tokenColorCustomizations": { | |
"[Flatland_Dark]": { | |
"comments": "#798188", | |
"functions": "#F8F8F8", | |
"keywords": "#FA9A4B", | |
"numbers": "#B8D977", | |
"strings": "#C4E2F2", | |
"types": "#F8F8F8", | |
"variables": "#F8F8F8", |
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
{ | |
"name": "flatland", | |
"defaults": { | |
"text_color":"f8f8f8", | |
"background":"26292c", | |
"activeline_background":"202325", | |
"matchingbracket_color":"bbbcbd" | |
}, | |
"gutters": { | |
"background":"26292c", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<style> | |
body { | |
margin: 0; | |
} |
NewerOlder