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
. { Invoke-WebRequest -UseBasicParsing http://boxstarter.org/bootstrapper.ps1 } | Invoke-Expression | |
Get-Boxstarter -Force | |
Install-BoxstarterPackage ` | |
-PackageName https://gist.githubusercontent.com/jrotello/b7ea60809e5a0afac4a6c3cc7936ca9a/raw/Windows10-Setup.ps1 ` | |
-Credential (Get-Credential -Message "Please provide login credentials for Boxstarter reboots") |
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
work/ | |
InstallUtil.InstallLog |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Signatures] | |
"XAdESLevel"=dword:00000002 | |
"MinXAdESLevel"=dword:00000002 | |
"TSALocation"="http://timestamp.comodoca.com" |
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
#!/bin/bash | |
# Setup your Domain | |
DOMAIN="<domain_name_here>" | |
DEHYDRATED_CERTS="/home/dehydrated/certs/$DOMAIN" | |
# Stop the services | |
echo "Stopping services..." | |
service nginx stop | |
service unifi stop |
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
/* | |
DROP TABLE IF EXISTS [dbo].[MyTab] | |
GO | |
CREATE TABLE [dbo].[MyTab]( | |
[ID] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
[Value] [nvarchar](50) NOT NULL, | |
[Version] [rowversion] NOT NULL, | |
) | |
*/ |
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
DECLARE @StartDate DATE = '20000101', @NumberOfYears INT = 100; | |
-- prevent set or regional settings from interfering with | |
-- interpretation of dates / literals | |
SET DATEFIRST 7; | |
SET DATEFORMAT mdy; | |
SET LANGUAGE US_ENGLISH; | |
DECLARE @CutoffDate DATE = DATEADD(YEAR, @NumberOfYears, @StartDate); |
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
"Generating new key pair..." | |
openssl.exe req -x509 -sha256 -newkey rsa:2048 -keyout cert.key -out cert.cer -days 365 | |
"Generating .pfx container..." | |
openssl.exe pkcs12 -export -in cert.cer -inkey cert.key -out cert.pfx | |
$x509 = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 | |
$x509.Import((Resolve-Path .\cert.cer)) | |
$x509 | Format-List | |
[System.Convert]::ToBase64String($x509.GetRawCertData()) |
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
Calendar = ADDCOLUMNS ( | |
CALENDAR (DATE(2016,1,1), DATE(2018,12,31)), | |
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ), | |
"Year", YEAR ( [Date] ), | |
"MonthNo", FORMAT ( [Date], "MM" ), | |
"YearMonthNo", FORMAT ( [Date], "YYYY/MM" ), | |
"YearMonth", FORMAT ( [Date], "YYYY/mmm" ), | |
"MonthShort", FORMAT ( [Date], "mmm" ), | |
"MonthLong", FORMAT ( [Date], "mmmm" ), | |
"WeekDayNo", WEEKDAY ( [Date] ), |
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
<!-- Allow Let's Encrypt ACME challange requests --> | |
<rule name="LetsEncryptAcmeChallange" stopProcessing="true"> | |
<match url="^\.well-known.*$" /> | |
<action type="None" /> | |
</rule> |
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
set firewall name WAN_OUT default-action accept | |
set firewall name WAN_OUT description "packets from intranet to internet" | |
set firewall name WAN_OUT rule 5 action accept | |
set firewall name WAN_OUT rule 5 description "Allow NTP on IP Cameras" | |
set firewall name WAN_OUT rule 5 log enable | |
set firewall name WAN_OUT rule 5 protocol tcp_udp | |
set firewall name WAN_OUT rule 5 source group address-group ip_cameras | |
set firewall name WAN_OUT rule 5 source port 123 | |
set firewall name WAN_OUT rule 10 action drop | |
set firewall name WAN_OUT rule 10 description "Block IP Cameras" |