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
#!/usr/bin/env python | |
""" | |
Recursively find and replace text in files under a specific folder with preview of changed data in dry-run mode | |
============ | |
Example Usage | |
--------------- | |
**See what is going to change (dry run):** |
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
Your name and email address were configured automatically based | |
on your username and hostname. Please check that they are accurate. | |
You can suppress this message by setting them explicitly: | |
git config --global user.name "Your Name" | |
git config --global user.email [email protected] | |
After doing this, you may fix the identity used for this commit with: | |
git commit --amend --reset-author |
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
############# | |
### ILIAD ### | |
############# | |
config interface 'wan3g' | |
option ifname 'modem' | |
option proto 'qmi' | |
option apn 'iliad' | |
option pincode '1234' | |
option autoconnect '1' |
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 | |
# URL : https://stackoverflow.com/questions/48400287/git-format-patch-for-all-the-commits-to-a-file | |
COUNTER=${2}; | |
for c in `git log --format="%H" -- ${1} | head -n ${2}`;do | |
git format-patch --start-number=$COUNTER "$c^1".."$c" -o patches | |
let COUNTER=COUNTER-1 | |
done |
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
#! /usr/bin/python3 | |
import os | |
import argparse | |
from time import sleep | |
PATH = '/sys/bus/usb/devices/' | |
def reset_device(key, value, coerce, sleep_time): | |
for device_dir, dirs, files in os.walk(PATH, followlinks=True): | |
if device_dir != PATH: |
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 | |
# Read-only Root-FS for Raspian using overlayfs | |
# Version 1.1: | |
# Changed to use /proc/mounts rathern than /etc/fstab for deriving the root filesystem. | |
# | |
# Version 1: | |
# Created 2017 by Pascal Suter @ DALCO AG, Switzerland to work on Raspian as custom init script | |
# (raspbian does not use an initramfs on boot) | |
# |
OlderNewer