We can use socat
to create 2 virtual serial ports that are connected to each
other locally. This can be useful for debugging serial port applications. Or
simulating serial port communication. Or running 2 legacy programs that only
communicate with each other over serial ports, such as old DOS games. And of
course, for education, since serial communication is probably the most simple
communication protocol there is, RS232 is considered at the bottom of the OSI
stack, at the "Physical Layer". See: http://electronics.stackexchange.com/questions/31171/internet-vs-serial-communication
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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <malloc.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#define MAIN_LOOPS (100) |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <malloc.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#define MAIN_LOOPS (100) |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <malloc.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#define MAIN_LOOPS (100) | |
#define TRIALS_PER_TOGGLE (10) |
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
#!/bin/sh | |
# | |
# Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# | |
# This script was part of the google-chrome package and has been adapted | |
# be devolo AG. | |
# | |
# It creates the repository configuration file for package updates, and it |
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
class Base | |
attr_reader :gitolite_config, :repository, :context, :options | |
def initialize(gitolite_config, repository, context, **options) | |
@gitolite_config = gitolite_config | |
@repository = repository | |
@context = context | |
@options = options.dup | |
@old_perms = {} | |
end |
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
#!/bin/bash | |
set -ex | |
mkdir -p /tmp/repro-1501 | |
cd /tmp/repro-1501 | |
bundle config set --local without 'development' | |
bundle env |
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
#!/bin/bash | |
# Based on https://github.com/jonls/redshift src/colorramp.c and src/gamma-randr | |
# and https://www.opengl.org/discussion_boards/showthread.php/146812-Gamma-correction-table | |
# requirements : bash >= 4.3 (nameref) | |
# mutter wayland compositor | |
# usage: | |
# script <action> <temperature mode> <gamma settings> |
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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm 4.2.0-rc3 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_ARM_HAS_SG_CHAIN=y | |
CONFIG_NEED_SG_DMA_LENGTH=y | |
CONFIG_ARM_DMA_USE_IOMMU=y | |
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 | |
CONFIG_MIGHT_HAVE_PCI=y |
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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm 3.18.0-rc3 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_ARM_HAS_SG_CHAIN=y | |
CONFIG_NEED_SG_DMA_LENGTH=y | |
CONFIG_ARM_DMA_USE_IOMMU=y | |
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 | |
CONFIG_MIGHT_HAVE_PCI=y |
NewerOlder