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
--- | |
- hosts: all | |
become: true | |
become_method: sudo | |
tasks: | |
- name: Update APT cache | |
apt: cache_valid_time=3600 update_cache=yes | |
- name: Upgrade installed packages | |
apt: upgrade=dist |
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
# vi: set ft=python: | |
import os | |
# Run scons three times: | |
# Run 1. Create new 'dummy_file' and 'file.tcl' | |
# Run 2. Build 'file.xpr' | |
# Run 3. Rebuild 'file.tcl' from 'file.xpr' (doesn't trigger currently) | |
generate_new_tcl = Builder(action='echo "dummy file" > $TARGET') |
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 | |
# | |
# Quick-and-dirty parallelizer, by Nicholas Clark | |
# | |
# Uses shell job-control to launch each argument as a subprocess. | |
# Waits until all subprocesses have finished. If all subprocesses | |
# returned 0, the result of the script is 0. Otherwise, the result | |
# will be the error-code of the first failed command in the argument | |
# list. | |
# |
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 python3 | |
""" Command-line utility for interfacing with an IP Power 9258 using the | |
serial debug interface. """ | |
import time | |
import sys | |
import re | |
import argparse | |
import ast | |
import serial |
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 | |
#------------------------------------------------------------------------------# | |
MERGE="no" | |
CHECK_ONLY="no" | |
PROGNAME=`echo "$0" | sed 's@.*/@@g'` | |
#------------------------------------------------------------------------------# |
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
# Shell script example of how to run Windows tools from inside | |
# of a Docker container on WSL2. Note that | |
# env_vars returns a list of all input words that are defined | |
# in the environment. | |
env_vars = $(strip $(foreach x,$1,$(if $(filter environment,$(origin $x)),$x,))) | |
WSL_VARS := $(sort $(call env_vars,$(filter WSL%,$(.VARIABLES)))) | |
comma := , |
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
#!/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -file | |
<# | |
.SYNOPSIS | |
PowerShell TCP/IP Client for Serial Port Communication. | |
.DESCRIPTION | |
This script establishes a TCP connection to a specified server and port and | |
relays data to and from a specified serial port (COM port). | |
.PARAMETER server |
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
$ErrorActionPreference = "Stop" | |
$principal = aNew-ScheduledTaskPrincipal ` | |
-UserId "$env:USERDOMAIN\$env:USERNAME" ` | |
-LogonType S4U ` | |
-RunLevel Limited ` | |
-ThrottleLimit 1 | |
$settings = New-ScheduledTaskSettingsSet ` | |
-MultipleInstances IgnoreNew ` |