Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/input.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#define EVDEV "/dev/input/event0"
#include <stdio.h>
#include <stdlib.h>
#include <dbus/dbus.h>
int main() {
DBusError error;
DBusConnection *bus;
DBusMessage *message, *reply;
dbus_error_init(&error);
#!/bin/bash -e
myRepo=$(pwd)
CMAKE_GENERATOR_OPTIONS=-G"Visual Studio 15 2017 Win64"
#CMAKE_GENERATOR_OPTIONS=(-G"Visual Studio 16 2019" -A x64) # CMake 3.14+ is required
if [ ! -d "$myRepo/opencv" ]; then
echo "cloning opencv"
git clone https://github.com/opencv/opencv.git
else
cd opencv
git pull --rebase
#!/bin/bash
file_checksum="$(sha256 $1 | awk '{print $1}')"
if [ "$2" == "$file_checksum" ]
then
echo OK
else
echo FAILD
fi
EXECUTABLE := app
ARGUMENTS := one two
BUILD_DIR := ./build
SRC_DIR := ./
INC_DIRS := ./
LIB_DIRS := ./
SRCS := $(shell find $(SRC_DIR) -name '*.cpp' -or -name '*.c')
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
#!/bin/bash
if [ $# -eq 1 ]
then
if ! [ -d $1 ]
then
echo "The directory '$1' does not exist or '$1' is a file"
else
git status --porcelain | sed s/^...// | xargs -t -i cp {} $1
fi
else