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 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
' Usage: terminator[.vbs] [path to starting directory] | |
' contents enclosed in square brackets optional | |
args = "-c" & " -l " & """DISPLAY=:0 terminator""" | |
' If there's a single argument, interpret it as the starting directory | |
If WScript.Arguments.Count = 1 Then | |
dir = WScript.Arguments(0) | |
Else | |
dir = "" |
This file contains 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 | |
# To add two items to the current .gitignore file: | |
# gitignore '*.swp' bin | |
# | |
# To sort and de-dupe the current .gitignore file: | |
# gitignore | |
# Append each argument to its own line: | |
for item in "$@"; do | |
echo "$item" >> .gitignore; |
This file contains 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 | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
To change a git submodule's remote (in this case, from HTTPS to SSH):
SUB=my-submodule-name
[email protected]:path/to/remote.git
git submodule deinit $SUB
git rm $SUB
git commit -m "removed $SUB submodule at https remote"
rm -rf .git/modules/$SUB
This file contains 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 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <submodule full name>" | |
exit 1 | |
fi | |
MODULE_NAME=$1 | |
MODULE_NAME_FOR_SED=$(echo $MODULE_NAME | sed -e 's/\//\\\//g') |
This file contains 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
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# |
NewerOlder