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
package main | |
import ( | |
"bytes" | |
"image/jpeg" | |
"log" | |
"path" | |
"strings" | |
apex "github.com/apex/go-apex" |
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
package main | |
import ( | |
"bytes" | |
"os" | |
"path" | |
"image/jpeg" | |
log "github.com/Sirupsen/logrus" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<!-- ... --> | |
<system.serviceModel> | |
<!-- ... --> | |
<diagnostics wmiProviderEnabled="true"> | |
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" /> | |
</diagnostics> | |
</system.serviceModel> | |
<!-- ... --> |
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
package main | |
import ( | |
"crypto/md5" | |
"crypto/sha1" | |
"crypto/sha256" | |
"crypto/sha512" | |
"crypto/tls" | |
"encoding/hex" | |
"flag" |
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
<# | |
.SYNOPSIS | |
Set Azure app service specific application settings (not web.config) | |
.DESCRIPTION | |
Set Azure app service specific application settings (not web.config) | |
.EXAMPLE | |
AzureSetAppSettings -ResourceGroupName "cmc-scm-tst-us-e-rg" -WebAppName "888888sisclientweb01" | |
.EXAMPLE | |
AzureSetAppSettings -ResourceGroupName "cmc-scm-tst-us-e-rg" -WebAppName "888888sisclientweb01" -Slot "qa" | |
.PARAMETER ResourceGroupName |
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
openssl pkcs12 -in mycert-cng.pfx -out mycert.pem | |
openssl pkcs12 -export -in mycert.pem -out mycert-cryptoapi.pfx |
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
Function Set-ConnectionString{ | |
[CmdletBinding(SupportsShouldProcess=$True)] | |
Param( | |
[string]$fileName="app.config", | |
[string]$connectionStringName, | |
[string]$connectionString | |
) | |
$config = [xml](Get-Content -LiteralPath $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
package main | |
import ( | |
"log" | |
"net/http" | |
"os" | |
) | |
func main() { | |
port := os.Getenv("PORT") |
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/env python | |
""" Download a website screenshot using Google's PageSpeed API """ | |
import base64 | |
import requests | |
site = "https://twitter.com/mrichman" | |
# api = "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?screenshot=true&strategy=mobile" |
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
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist && \ | |
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist && \ | |
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz && \ | |
sudo pkgutil --forget org.macosforge.xquartz.pkg && \ | |
rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.cache && rm -rf ~/.rnd && \ | |
rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11 |