Skip to content

Instantly share code, notes, and snippets.

View petersgiles's full-sized avatar
💭
forking everything

Pete petersgiles

💭
forking everything
View GitHub Profile
@petersgiles
petersgiles / host-named-sites.ps1
Created July 14, 2016 22:03 — forked from wpsmith/host-named-sites.ps1
Powershell: SharePoint 2013 Create Web Application, Root Site Collection,
# Replace:
# DATABASE
# NAMED
# APPLICATION NAME
# hostheadername
# DOMAIN\USER
# DOMAIN\SP_FARM_ACCOUNT
# PATHNAME
# SITE COLLECTION NAME
# DIRECTORYPORT
@petersgiles
petersgiles / New-SPSiteWithCustomWebAppAndPoolAndAccount.ps1
Created July 14, 2016 22:03 — forked from janikvonrotz/New-SPSiteWithCustomWebAppAndPoolAndAccount.ps1
PowerShell: Create a new SharePoint Site with a custom web application and managed account and application pool #PowerShell #SharePoint
# modules
Import-Module ActiveDirectory
if((Get-PSSnapin 'Microsoft.SharePoint.PowerShell' -ErrorAction SilentlyContinue) -eq $null){Add-PSSnapin 'Microsoft.SharePoint.PowerShell'}
# new service account
$UserName = "SharePoint Service User Wiki"
$UserUPN = "sa-spwiki@vbl.ch"
$UserSam = "sa-spwiki"
$UserPassword = "pass."
@petersgiles
petersgiles / entry.js
Created May 30, 2017 21:56 — forked from DevWurm/entry.js
angular-cli Electron configuration
const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win
function createWindow () {
// Create the browser window.
@petersgiles
petersgiles / SetUnblockPolicy.ps1
Created September 2, 2017 09:44 — forked from gbiellem/SetUnblockPolicy.ps1
Turn off Downloads being "Blocked"
$reg = @{
Path = 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments'
Name = 'SaveZoneInformation'
PropertyType = 'DWORD'
Value = 1
}
if (-not (Test-Path -Path $reg.Path)) {
New-Item $reg.Path
}
@petersgiles
petersgiles / docx2md.md
Created September 9, 2017 01:00 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@petersgiles
petersgiles / install-clamav-osx.md
Created June 3, 2018 10:39 — forked from gagarine/install-clamav-osx.md
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

$ brew install clamav
$ cd /usr/local/etc/clamav
$ cp freshclam.conf.sample freshclam.conf

Open freshclam.conf and comment the "Example" line: