Skip to content

Instantly share code, notes, and snippets.

@nitsh
nitsh / Install-7Zip.ps1
Created January 21, 2019 11:31
Install 7Zip in windows from powershell
#Inspired from https://github.com/ferventcoder/vagrant-windows-puppet/blob/master/boxes/shared/shell/InstallPuppetFromMSI.ps1
$7ZipUrl = "https://www.7-zip.org/a/7z1806.msi"
$7ZipInstallerPath = 'c:\vagrant\bin'
$7ZipInstallerFile = '7z1806.msi'
$7ZipInstaller = Join-Path $7ZipInstallerPath $7ZipInstallerFile
if ([System.IntPtr]::Size -eq 8) {
Write-Host "Going to 7Zip 64-bit."
@nitsh
nitsh / Install-Puppet.ps1
Created January 21, 2019 11:29
Install puppet in windows with powershell
#https://github.com/ferventcoder/vagrant-windows-puppet/blob/master/boxes/shared/shell/InstallPuppetFromMSI.ps1
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-3.7.3.msi"
$PuppetInstallerPath = 'c:\vagrant\bin'
$PuppetInstallerFile = 'puppet.msi'
$PuppetInstaller = Join-Path $PuppetInstallerPath $PuppetInstallerFile
if ([System.IntPtr]::Size -eq 8) {
Write-Host "Going to Puppet 64-bit."

Keybase proof

I hereby claim:

  • I am nitsh on github.
  • I am nitishalluri (https://keybase.io/nitishalluri) on keybase.
  • I have a public key ASBoxIMaoI_bvBeD_Lv0FDYd3aa9rE5O08XPGRP3pmWu7wo

To claim this, I am signing this object:

case object transaction {
import java.sql.Connection
def apply[T](query:(Connection) => T):Option[T] = {
val conn:Connection = play.db.DB.getConnection
val auto:Boolean = conn.getAutoCommit
try {
conn.setAutoCommit(false)
query(conn)
} catch {