Skip to content

Instantly share code, notes, and snippets.

View xueliu's full-sized avatar
🏠
Working from home

Xue Liu xueliu

🏠
Working from home
View GitHub Profile
########################################################################
########################################################################
## This is a sample configuration file for the ftpsync mirror script. ##
## Only options most users may need are included. For documentation ##
## and all available options see ftpsync.conf(5). ##
########################################################################
########################################################################
# MIRRORNAME=`hostname -f`
TO="/home/debian-mirror/data"
@sooorajjj
sooorajjj / STM32MP157
Last active December 31, 2022 23:01
Stinger96
#STM32MP1
source /home/ssd/STM/STM32MP1/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi
set | grep CROSS
# CROSS_COMPILE=arm-openstlinux_weston-linux-gnueabi-
############################### Build kernel #################################
cd /home/ssd/STM/STM32MP1/Developer-Package/stm32mp1-openstlinux-4.19-thud-mp1-19-10-09/sources/arm-openstlinux_weston-linux-gnueabi/linux-stm32mp-4.19-r0/linux/
@hawell
hawell / engine.c
Created January 28, 2019 12:43
OpenSSL "EngineBuilding Lesson 2" updated for openssl-1.1.x : https://www.openssl.org/blog/blog/2015/11/23/engine-building-lesson-2-an-example-md5-engine/
#include "openssl/engine.h"
#include "openssl/evp.h"
#include "rfc1321/global.h"
#include "rfc1321/md5.h"
#define MD5_DIGEST_LENGTH 16
#define MD5_CBLOCK 64
static const char *engine_id = "MD5";
static const char *engine_name = "A simple md5 engine for demonstration purposes";
@erichschroeter
erichschroeter / termios_dbg.c
Created June 7, 2013 14:20
Debug statements for termios struct.
#include <stdio.h>
#include <sys/ioctl.h>
#include "termios_dbg.h"
#define CHECK_BIT(var, pos) ((var) & (1<<(pos)))
void ptermios_iflag(struct termios *tty)
{
printf("c_iflag=0x%x\n", tty->c_iflag);
@Alexey-N-Chernyshov
Alexey-N-Chernyshov / client.c
Last active April 22, 2024 09:41
Example of client/server with select().
// Simple example of client.
// Client prints received messages to stdout and sends from stdin.
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/select.h>
#include <netinet/in.h>