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
#Save File | |
################## | |
$MyDict = @{} | |
$MyDict.Add($SomeKey1, $SomeValue1) | |
$MyDict.Add("KEY2", "Value2") | |
$MyDict.Add("KEY3", "Value3") | |
try { | |
$MyDict | Export-Clixml $FilePathToDict |
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
SET ThousandSep='.'; | |
SET DecimalSep=','; | |
SET MoneyThousandSep='.'; | |
SET MoneyDecimalSep=','; | |
SET MoneyFormat='#.##0,00 €;-#.##0,00 €'; | |
SET TimeFormat='hh:mm:ss'; | |
SET DateFormat='DD.MM.YYYY'; | |
SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]'; | |
SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez'; | |
SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So'; |
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
################### | |
Forti | |
################### | |
FG80C-HQ # config vpn ipsec phase1-interface | |
FG80C-HQ (phase1-interface) # show | |
config vpn ipsec phase1-interface | |
edit "BRO-IPSEC" | |
set type dynamic | |
set interface "wan1" |
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
#Module | |
filter timestamp {"$(Get-Date -Format yyyy-MM-dd-HH:mm:ss.fff): $_"} | |
$CConfig = @{} | |
function Import-CConfig{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true,Position=1)] | |
[ValidateNotNullorEmpty()] |
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
# musescore gitignore | |
# https://stackoverflow.com/questions/987142/make-gitignore-ignore-everything-except-a-few-files | |
# Ignore everything | |
* | |
# But not these files... | |
!.gitignore | |
!README.md | |
!*.mscx | |
!*.musicxml |
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
# install btrfs + bees (dedup daemon) | |
# --------------------------------- | |
# add new "big" disk to vm (edit vm, add new disk) | |
# be root | |
su - | |
# check for new disk in guest |
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
# https://communities.vmware.com/thread/278559 | |
$Destination = "/mnt/backup0/vmx/" | |
Connect-VIServer -Server <server> -User <user> -Password <password> | |
$ClusterReport=@() | |
$vms = Get-VM | |
foreach($item in $vms){ |
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
# https://communities.vmware.com/thread/278559 | |
$Destination = "/mnt/backup0/vmx/" | |
Connect-VIServer -Server <server> -User <user> -Password <password> | |
Get-VM | ` | |
Get-View | ` |
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 | |
set -e | |
filename="./my-file" | |
waitseconds=30 | |
now=$(date +%s) | |
timeout=$(( now + waitseconds )) | |
file_modified=$(stat -c '%Y' $filename) |
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 | |
# more strict, if something goes wrong, script stops | |
set -e | |
workdir=/root/dns_syncer | |
newhostsfile=$workdir/newhosts | |
# copy file from primary | |
scp -q -o LogLevel=QUIET unpriv@mydns1:/etc/hosts $newhostsfile |
OlderNewer