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 <string.h> | |
| #include <dlfcn.h> | |
| int main(int argc, char** argv) | |
| { | |
| void *handle; | |
| void (*func_print_name)(const char*); |
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
| from multiprocessing import Process | |
| import socket | |
| import os | |
| import time | |
| DEFAULT_PORT = 5454 | |
| class Client(Process): |
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
| /* | |
| * Author: David Robert Nadeau | |
| * Site: http://NadeauSoftware.com/ | |
| * License: Creative Commons Attribution 3.0 Unported License | |
| * http://creativecommons.org/licenses/by/3.0/deed.en_US | |
| */ | |
| #if defined(_WIN32) | |
| #include <Windows.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
| #define C_UNIQUE_PTR __attribute__((cleanup(cleanup_free))) | |
| static void cleanup_free(void *p) | |
| { | |
| free(*(void **)p); // in some platform we might have to check for nulls | |
| } |
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
| docker create -v /var/lib/postgresql/data --name PostgresData alpine | |
| docker run --name some_name -p 5432:5432 -e POSTGRES_DB=scribe -e POSTGRES_PASSWORD=bogus_password -d --volumes-from PostgresData postgres |
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" | |
| "reflect" | |
| ) | |
| type Foo struct { | |
| FirstName string `tag_name:"tag 1"` | |
| LastName string `tag_name:"tag 2"` |