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
# Connected to ethernet | |
# Power via USB | |
# First-time login using ssh: | |
# $ ssh [email protected] (pwd shown at login) | |
# change default password | |
passwd | |
# we will install for user `root` | |
sudo su - |
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 | |
# -*- coding: utf-8 -*- | |
class Color(object): | |
""" | |
reference from https://gist.github.com/Jossef/0ee20314577925b4027f and modified bit. | |
""" | |
def __init__(self, text, **user_styles): |
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
grep -rnw /path/to/search -e "text to find" 2>/dev/null |
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 | |
sudo apt-get update | |
sudo apt-get autoclean | |
sudo apt-get autoremove | |
sudo apt-get upgrade |
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
# WD Red | |
# - check some stuff and track everything (-a) | |
# - ignore temperature (194 and 231) and power-on hours (9) attributes (-I) | |
/dev/disk/by-id/ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T0938110 -a -d sat \ | |
-I 194 -I 231 -I 9 \ | |
-m root -M diminishing | |
/dev/disk/by-id/ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T0965778 -a -d sat \ | |
-I 194 -I 231 -I 9 \ | |
-m root -M diminishing | |
/dev/disk/by-id/ata-WDC_WD30EFRX-68AX9N0_WD-WMC1T0876678 -a -d sat \ |
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
import os | |
class UserNotFound(Exception): pass | |
### Windows ### | |
if os.name == 'nt': | |
import ctypes | |
from ctypes import windll, wintypes | |
class WinError: # [1] |