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 -x | |
# This script will convert all your git submodules into git subtrees. | |
# This script ensures that your new subtrees point to the same commits as the | |
# old submodules did, unlike most other scripts that do this. | |
# THIS SCRIPT MUST BE PLACED OUTSIDE OF YOUR REPOSITORY!!!!!!!!!! | |
# Otherwise, the script will interfere with the git commits (unless you add it to .gitignore). | |
# Save the script in your home directory as `~/subtrees.sh` | |
# `cd` into your repository | |
# Run `~/subtrees.sh` | |
# Enjoy! |
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
#include <Adafruit_NeoPixel.h> | |
const int LED_PIN = 6; | |
const int TACH_PIN = 2; | |
const int BRIGHTNESS = 100; | |
const int LED_COUNT = 80; | |
const int REDLINE = 7500; | |
const int WARN_RPM = 6000; | |
const int WARN_INTERVAL = 70; |
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******************************* | |
# cat names.csv | ./name.sh > names-processed.csv | |
target_col=3 | |
new_title="FirstName,LastName," | |
#pass the header line through the buffer first | |
read header | |
title=$(echo $header | sed -r "s/([^,]*,){$target_col}.*$/\1/") | |
echo $header | sed -r "s/$title/$new_title/" |