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
' DESCRIPTION: | |
' This script will backup bitlocker recovery information to active directory for drives which are already encrypted. | |
' DEVELOPED BY: | |
' Himanshu Singh ([email protected]) | |
' Microsoft Corporation | |
' Patched by Evgeny Varnavskiy | |
' Sep 2018 |
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 | |
# Delete older than n days | |
find /var/spool/asterisk/monitor -mtime +75 -name '*.mp3' -delete | |
#Delete files smaller than n K | |
find /var/spool/asterisk/monitor -size -30k -name '*.mp3' -delete |
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
A QA engineer walks into a bar, and orders a beer. | |
Then he orders 0 beers. | |
Then he orders 999999999999 beers. | |
Then he orders an aardvark. | |
Then he orders nothing. | |
Then he orders -1 beers. |
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
A giant ship engine failed. The ship’s owners tried one expert after another, but none of them could figure out how to fix the engine. | |
Then they brought in an old man who had been fixing ships since he was young. He carried a large bag of tools with him, and when he arrived, he immediately went to work. He inspected the engine very carefully, top to bottom. | |
Two of the ship’s owners were there, watching this man, hoping he would know what to do. After looking things over, the old man reached into his bag and pulled out a small hammer. He gently tapped something. Instantly, the engine lurched into life. He carefully put his hammer away. The engine was fixed! | |
A week later, the owners received a bill from the old man for ten thousand dollars. | |
“What?!” the owners exclaimed. “He hardly did anything!” | |
So they wrote the old man a note saying, “Please send us an itemized bill.” | |
The man sent a bill that read: | |
Tapping with a hammer………………….. $ 2.00 | |
Knowing where to tap…………………….. $ 9,998.00 |
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
Get-ADUser -SearchBase "DC=domain,DC=local" -Filter {(mail -ne "null") -and (Enabled -eq "true")} | Format-Table -HideTableHeaders SamAccountName | Out-File d:\aduserlist.txt |
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
#!/usr/bin/env zsh | |
# https://gist.github.com/Eriner/6be8c43d8aff8134f7d8fb547612aadf | |
filetypes=(html xml css) | |
zcomp() { | |
print "zopfli compressing ${1}" | |
for file in ./_site/**/*.${1}; do | |
zopfli --i1000 ${file} | |
done |
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 | |
#find . -mtime +90 -exec mv {} /monitor/mp3/todelete \; | |
# Delete older than n days | |
find /monitor/mp3/ -mtime +60 -delete | |
find /backups/ -mtime +180 -type f -delete | |
#Delete files smaller than n K | |
find /monitor/mp3/ -size -30k -type f -delete |
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
It kinda went like this... | |
In the beginning there were developers, testers, sysadmins, dba's, network engineers, and at bigger places operators. By 'beginning' I mean like, a decade ago for where I worked, some places its still this way today. | |
This was not a good or natural state of affairs, its just how things were given the tech & talent at the time. It also required a business be big & successful enough to hire some number of people for those roles. Most places there was not a small amount of tension between devs and sysadmins. | |
Then the cloud happened. It ate away at the bottom 50% of what sysadmins did, the bottom 20% of what dba's did, and 80% of what network engineers did. At the same time the growth in scripting languages and a mantra of "automate everything" led to most of what testers and operators did getting replaced with scripts and cron jobs (or nowadays jenkins). | |
That meant that sysadmins had to shift focus up a half-layer and change their attitude from one of protecting the users and the bu |
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
What do I do? | |
System architecture. | |
Networking and security. | |
No one in this house can touch me on that. | |
While you were busy minoring in gender studies and singing a capella at Sarah Lawrence, | |
I was gaining root access to NSA servers. | |
I was one click away from starting a second Iranian revolution. | |
I prevent cross-site scripting, I monitor for DDoS attacks, emergency database rollbacks, and faulty transaction handlings. |
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
#!/usr/bin/python3 | |
# POST load testing script | |
# Eugene Varnavsky 2017 | |
# MIT License | |
from urllib.parse import urlencode | |
from urllib.request import Request, urlopen | |
import urllib | |
import _thread |