Skip to content

Instantly share code, notes, and snippets.

@CoreyWycliffe
CoreyWycliffe / drupal_config_uninstall.yml
Created July 25, 2020 23:58
How to get Drupal to uninstall a config from /config/install when you uninstall the module, add these lines to your config yml file
dependencies:
module:
- your_module_name_here
enforced:
module:
- your_module_name_here
@CoreyWycliffe
CoreyWycliffe / MsgtoSlack.ps1
Created July 18, 2020 21:31
Powershell send message to slack
$payload = @{
"text" = "Testing a message from Powershell";
}
Invoke-WebRequest `
-Body (ConvertTo-Json -Compress -InputObject $payload) `
-Method Post -Uri "{SLACK_HOOK_URL}" | Out-Null
@CoreyWycliffe
CoreyWycliffe / hotfix-checker.ps1
Created July 18, 2020 21:29
Check if a hotfix already exists on a windows computer
$hotfixes = "KB3205409", "KB3210720", "KB3210721", "KB3212646", "KB3213986", "KB4012212", "KB4012213", "KB4012214", "KB4012215", "KB4012216", "KB4012217", "KB4012218", "KB4012220", "KB4012598", "KB4012606", "KB4013198", "KB4013389", "KB4013429", "KB4015217", "KB4015438", "KB4015546", "KB4015547", "KB4015548", "KB4015549", "KB4015550", "KB4015551", "KB4015552", "KB4015553", "KB4015554", "KB4016635", "KB4019213", "KB4019214", "KB4019215", "KB4019216", "KB4019263", "KB4019264", "KB4019472", "KB4015221", "KB4019474", "KB4015219", "KB4019473"
#checks the computer it's run on if any of the listed hotfixes are present
foreach ($hotfix in $hotfixes) {
Write-Host $hotfix
if (Get-HotFix -Id $hotfix -ComputerName $env:computername)
{
Write-Host -NoNewline "Found HotFix:"
} else {
Write-Host -NoNewline "Didn't find HotFix:"
@CoreyWycliffe
CoreyWycliffe / install_git_lfs.sh
Last active May 31, 2019 17:19 — forked from tkafka/install_git_lfs.sh
Compile and Install git-lfs on Raspberry Pi (with golang compilation)
install_git_lfs()
{
set -e
# Get out if git-lfs is already installed
if $(git-lfs &> /dev/null); then
echo "git-lfs is already installed"
return
fi
GIT_LFS_BUILD=$HOME/.bin
@CoreyWycliffe
CoreyWycliffe / git-clone.txt
Created November 21, 2018 14:59
cloning a repository to another place
git clone --mirror URL
git remote add NEW-REMOTE URL
git push NEW-REMOTE --mirror
@CoreyWycliffe
CoreyWycliffe / powershell-sendgrid.ps1
Created July 12, 2018 17:11
Send Email through Sendgrid using Powershell
Send-MailMessage -To (Read-Host -Prompt 'Enter to: address') -From (Read-Host -Prompt 'Enter from: address') -Subject (Read-Host -Prompt 'Enter subject') -Body (Read-Host -Prompt 'Enter email body') -SmtpServer "smtp.sendgrid.net" -Credential apikey -Port 587 -UseSsl

Keybase proof

I hereby claim:

  • I am coreywycliffe on github.
  • I am coreywycliffe (https://keybase.io/coreywycliffe) on keybase.
  • I have a public key ASDuc2wzd7LkXcA4cwApCToC7VOgoxVEpk7mFmPTtqhE2Qo

To claim this, I am signing this object: