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
FROM ubuntu | |
ARG REBUILD_SEED=0 | |
ARG SIZE=1M | |
# Common set of layers | |
RUN head -c "${SIZE}" </dev/urandom >/random00 | |
RUN head -c "${SIZE}" </dev/urandom >/random01 | |
RUN head -c "${SIZE}" </dev/urandom >/random02 | |
RUN head -c "${SIZE}" </dev/urandom >/random03 |
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/sh | |
set -e | |
if which netplan 1>&2 2>/dev/null; then | |
ip -br link show up | awk '{print $1}' | while read -r int; do | |
if netplan ip leases 2>/dev/null; then | |
echo "${int} auto" | |
else | |
echo "${int} manual" |
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
// Task to download all dependencies for all targets | |
task downloadDependencies { | |
doLast { | |
rootProject.allprojects { project -> | |
Set<Configuration> configurations = project.buildscript.configurations + project.configurations | |
configurations.findAll { c -> c.canBeResolved } | |
.forEach { c -> c.resolve() } | |
} | |
} | |
} |
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 is an example of krb5.conf for authentication with Active Directory | |
# Tested on libkrb5-3 1.15-1+deb9u1 | |
[libdefaults] | |
default_realm = EXAMPLE.COM | |
dns_lookup_realm = true | |
dns_lookup_kdc = true | |
forwardable = true | |
# Values for next three parameters should be used from Default Domain Policy GPO |
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
$Server = 'SQL-APPS' | |
$ConnectionTimeout = 15 | |
$MaxConnections = 500 | |
$ConnectionStringFormat = 'Server = {0}; Connection Timeout = {1}; Max Pool Size = {2}; Integrated Security = True;' | |
$CommandQuery = 'SELECT 1' | |
$ConnectionString = $ConnectionStringFormat -f $Server, $ConnectionTimeout, $MaxConnections | |
$Connections = [System.Collections.ArrayList] @() |
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
function New-PerfomanceCounterHash | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter()] | |
[Switch] $NotLocalized | |
) | |
$KeyName = 'Counter' |
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
function Get-RandomString | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Position = 0, Mandatory = $true)] | |
[UInt32] $Length, | |
[Parameter()] | |
[String] $Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' |
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
function Send-Datagram | |
{ | |
[CmdletBinding(SupportsShouldProcess = $true)] | |
param | |
( | |
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)] | |
[AllowEmptyCollection()] | |
[AllowEmptyString()] | |
[AllowNull()] | |
[Alias('Data')] |
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
apt-mark showmanual | while read -r package; do size=$(apt-cache --no-all-versions show $package | grep '^Installed-Size: ' | cut -f2 -d':' | xargs) && echo "$package $size"; done | sort -rnk2 |
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
SELECT | |
j.[name] [job_name], | |
s.[step_id] [step_number], | |
s.[step_name] [step_name], | |
s.[command] [step_query], | |
s.[database_name] [step_database] | |
FROM | |
[msdb].[dbo].[SysJobs] j | |
INNER JOIN [msdb].[dbo].[sysjobsteps] s ON s.[job_id] = j.[job_id] | |
WHERE |
NewerOlder