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
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
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
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
@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
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
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
import unittest | |
NUMB = """ | |
73167176531330624919225119674426574742355349194934 | |
96983520312774506326239578318016984801869478851843 | |
85861560789112949495459501737958331952853208805511 | |
12540698747158523863050715693290963295227443043557 | |
66896648950445244523161731856403098711121722383113 | |
62229893423380308135336276614282806444486645238749 | |
30358907296290491560440772390713810515859307960866 |
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
def find_next_prime(n): | |
''' | |
>>> find_next_prime(6) | |
7 | |
>>> find_next_prime(10) | |
11 | |
>>> find_next_prime(11) | |
13 | |
''' | |
def is_prime(p): |
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
# Create and Enable Allow Ping Rule | |
# Windows server 2012 | |
New-NetFirewallRule –DisplayName “Allow Ping” –Direction Inbound –Action Allow –Protocol icmpv4 –Enabled True |