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 unittest | |
def find_anagrams(list_of_strings, word): | |
anagrams = [] | |
for test_word in list_of_strings: | |
if ''.join(sorted(test_word)) == ''.join(sorted(word)): | |
anagrams.append(test_word) | |
return anagrams |
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
a = [1, 2, 3, 4] | |
# call the trace debugger | |
import ipdb | |
ipdb.set_trace() | |
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
@echo off | |
SET SORC="\\server\share" | |
SET DEST="Z:\WHERE YOU WANT FILES TO GO" | |
SET LOG="Z:\THE LOG FILE.log" | |
ROBOCOPY %SORC% %DEST% /MIR /SEC /R:1 /W:1 /NP /LOG:%LOG% | |
@if errorlevel 16 echo ***ERROR *** & goto END | |
@if errorlevel 8 echo **FAILED COPY ** & goto END | |
@if errorlevel 4 echo *MISMATCHES * & goto END |
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
Get-ChildItem -Directory -Recurse | where-object { $_.Name -like "My Documents" } | Rename-Item -newname { $_.name -replace "My Documents", "Documents" } -force |
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
version: '2' | |
volumes: | |
config-data: | |
driver: nimble | |
driver_opts: | |
sizeInGiB: 500 | |
description: "ZoneMinder Data and Config" | |
services: |
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
domain-needed | |
bogus-priv | |
domain=lan.delianna.net | |
expand-hosts | |
local=/lan.delianna.net/ | |
# do not use /etc/resolv.conf or /etc/hosts | |
no-hosts | |
no-resolv | |
no-poll |
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
# MP3 CONFIG | |
#--extract-audio | |
#--audio-format "mp3" | |
#--ignore-errors | |
#-o '~/youtube/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' | |
# VIDEO CONFIG | |
--ignore-errors | |
-f best[height<=?720,ext=mp4] |
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
# Mailboxes size: | |
Get-MailboxDatabase | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Export-Csv "Z:\Mailboxes.csv" | |
# Databases size: | |
Get-MailboxDatabase -Status | Select-Object Name,@{N="DatabaseSize GB";E={$_.DatabaseSize.ToGB()}},AvailableNewMailboxSpace | Sort-Object Name | fl | |
# Move database to another drive or path: | |
move-DatabasePath -Identity '$DB' -EdbFilePath 'New_File_Path.edb' -LogFolderPath 'New_Log_Path' | |
# Get count per 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
sudo ros service enable rancher-server | |
sudo ros service up rancher-server | |
# If you want to see what services are available (not many), just run: | |
sudo ros service 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
sudo nmap -p 80,443 192.168.1.10 |