Skip to content

Instantly share code, notes, and snippets.

@fernandoc1
fernandoc1 / Makefile
Created May 1, 2023 19:41
A library to dump texture in SoH
LIBS=-I/usr/include/opencv4/ -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs
all:
g++ -g $(LIBS) -Wl,--no-as-needed -fPIC -shared dumper.cpp -o libdumper.so
patchelf --add-needed libopencv_core.so libdumper.so
patchelf --add-needed libopencv_imgproc.so libdumper.so
patchelf --add-needed libopencv_highgui.so libdumper.so
patchelf --add-needed libopencv_imgcodecs.so libdumper.so
import os
#def stop_handler(event):
# print("Stopped at:", gdb.selected_frame().pc())
#gdb.events.stop.connect(stop_handler)
# Set a breakpoint at main
#gdb.Breakpoint("main")
"""
Swing JList example in Jython.
Creates a simple list of cities and then updates a JLabel based on the
the city selected.
Greg Moore
Sept 2007
"""
all:
g++ -fPIC -shared test.cpp -o libtest.so -ldl
g++ a.cpp -shared -fPIC -o liba.so
g++ -Wl,--unresolved-symbols=ignore-in-shared-libs main.cpp libtest.so
@fernandoc1
fernandoc1 / test.py
Created October 22, 2020 13:29
Teste da Monetizze
#! /usr/bin/python3
import random
class Bet:
def __init__(self, numberAmount, totalBets):
self.numberAmount = numberAmount
self.result = None
self.totalBets = totalBets
betList = []
@fernandoc1
fernandoc1 / HisiliconInstall.md
Created September 28, 2020 12:53
Installing Hisilicon SDK

To install Hisilicon SDK toolchain in Ubuntu 18.04 install the following packages:

Download the SDK from:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 
sudo apt-get install multiarch-support 
sudo dpkg --add-architecture i386 
sudo apt-get install zlib1g:i386
@fernandoc1
fernandoc1 / Common.c
Created September 2, 2020 18:08
Kinesis Common.c for alternate TURN servers.
#define LOG_CLASS "WebRtcSamples"
#include "Samples.h"
PSampleConfiguration gSampleConfiguration = NULL;
VOID sigintHandler(INT32 sigNum)
{
UNUSED_PARAM(sigNum);
if (gSampleConfiguration != NULL) {
ATOMIC_STORE_BOOL(&gSampleConfiguration->interrupted, TRUE);
@fernandoc1
fernandoc1 / kinesis.log
Created August 26, 2020 20:05
Kinesis failure log
[KVS Master] Using trickleICE by default
[KVS Master] Created signaling channel L1HEMPNBA9XG5YDF111A
[KVS Master] Finished setting audio and video handlers
[KVS Master] KVS WebRTC initialization completed successfully
2020-08-26 19:58:51 INFO createSignalingClientSync(): Creating Signaling Client Sync
2020-08-26 19:58:51 VERBOSE lwsHttpCallbackRoutine(): HTTPS callback with reason 21
2020-08-26 19:58:51 VERBOSE signalingClientStateChanged(): Signaling client state changed to 1 - 'New'
2020-08-26 19:58:51 DEBUG stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002
2020-08-26 19:58:51 VERBOSE signalingClientStateChanged(): Signaling client state changed to 2 - 'Get Security Credentials'
2020-08-26 19:58:51 DEBUG stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000004
@fernandoc1
fernandoc1 / master.c
Created August 26, 2020 17:26
This is my samples/kvsWebRTCClientMaster.c modifications
#include "shared_memory_source.hpp"
#include "Samples.h"
extern PSampleConfiguration gSampleConfiguration;
FrameSource* frameSource = new SharedMemorySource();
// #define VERBOSE
INT32 main(INT32 argc, CHAR* argv[])