Skip to content

Instantly share code, notes, and snippets.

View kashimAstro's full-sized avatar
🔒
busy

Dario Longobardi kashimAstro

🔒
busy
View GitHub Profile
@kashimAstro
kashimAstro / fhogOF.cpp
Created January 25, 2017 11:46
extract fhog with dlib and openframeworks
void drawFHOG(ofPixels store, int x, int y)
{
ofPixels pix;
ofImage debug;
ofPushMatrix();
array2d<matrix<float,31,1> > hog;
array2d<rgb_pixel> img;
toDLib(store,img);//<-- view ofxDLib
@kashimAstro
kashimAstro / README.md
Last active May 5, 2021 17:47
H3 / Mali GPU driver and openframeworks armv7 ES / ES2

#A small guide to compile openFrameworks armv7 with driver OpenGL ES / ES2 sunxi for H3 / Mali GPU on ARMBIAN OS, compatible with orangepi and bananapi.

tested on: orangepi one banana pi M2

dependencies:

apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev \ 
           x11proto-xf86dri-dev libxfixes-dev x11proto-dri2-dev xserver-xorg-dev \
 build-essential automake pkg-config libtool ca-certificates git cmake subversion
@kashimAstro
kashimAstro / UART3_enable.md
Last active November 16, 2022 12:09
sunxi H3 enable UART3

#simple step for enable UART3 H3 allwinner sunxi
download suite sunxi:
git clone https://github.com/linux-sunxi/sunxi-tools
compile:
make
convert /boot/script.bin in .fex ascii file for editing:
./bin2fex /boot/script.bin ~script.fex

@kashimAstro
kashimAstro / google_image.cpp
Created March 3, 2017 18:26
search image by google for popular trainer dlib
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <stdio.h>
#include <regex>
#include <fstream>
#include <curl/curl.h>
void write_file(std::string p, std::string d)
@kashimAstro
kashimAstro / tcp.ino
Created March 13, 2017 14:54
TCP server for ESP-07
#include <ESP8266WiFi.h>
const char* ssid = "************";
const char* password = "************";
WiFiServer server(5055);
int pinLeft = 13;
int pinRight = 12;
bool ValLeft = false;
@kashimAstro
kashimAstro / sem_multithread.cpp
Created October 18, 2017 09:49
simple multithreading with semaphore posix c++
#include <iostream>
#include <unistd.h>
#include <thread>
#include <vector>
#include <signal.h>
#include <semaphore.h>
using namespace std;
vector<thread*> th;
@kashimAstro
kashimAstro / force-sshpass.cpp
Last active March 3, 2021 13:28
c++ brute force ssh multithreading with sshpass
/*
Author: Dario Longobardi
Test ssh brute force multithreading
*/
#include <iostream>
#include <unistd.h>
#include <thread>
#include <vector>
@kashimAstro
kashimAstro / ofxgpio-spi-speed.cpp
Created December 20, 2017 12:25
spi speed with ioctl ofxGPIO
#include "ofxGPIO.h"
/*
ofxGPIO
speed test SPI
*/
int main(int argc, char ** argv)
{
@kashimAstro
kashimAstro / segment.cpp
Created January 2, 2018 19:55
ofxGPIO test 7 segment
#include <iostream>
#include "ofxGPIO.h"
#define CMD 0x80
#define ON 0x01
#define OFF 0
#define BRI 0xE0
#define ADD 0x70
I2c * i2c;
@kashimAstro
kashimAstro / https.conf
Created January 26, 2018 23:08
https apache
# mkdir /etc/apache2/ssl
# openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key
# a2enmod ssl
# ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf
# vi /etc/apache2/sites-enabled/000-default-ssl.conf
change:
## SSLCertificateFile /etc/apache2/ssl/server.crt
## SSLCertificateKeyFile /etc/apache2/ssl/server.key
# /etc/init.d/apache2 restart