Skip to content

Instantly share code, notes, and snippets.

View ferventcoder's full-sized avatar
🎯
Focusing

Rob Reynolds ferventcoder

🎯
Focusing
View GitHub Profile
@erichexter
erichexter / gist:3717010
Created September 13, 2012 19:35
install chocolatey with windows auth proxy
Set-ExecutionPolicy -ExecutionPolicy Unrestricted;$a=new-object net.webclient;$a.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials;$a.downloadstring('http://bit.ly/OKgXHP')|iex
@smerchek
smerchek / windows_installer.pp
Last active October 17, 2016 13:29
Puppet for windows installers at Softek
# This is the basic structure for a Windows project puppet module at Softek
# We found that the Package type as provided by Puppet was not quite sufficient for our needs.
# Instead, we transfer the file, exec msiexec when it changes (while logging install output), and then ensure the service is running.
class some_project {
$installer = 'Project.Setup.msi'
$url = "puppet:///release/${installer}"
file { "c:/packages/${installer}":
ensure => 'file',
mode => '1777',
@kylog
kylog / gist:5959294
Created July 9, 2013 17:21
This is part of .bash_kylo. The prompt stuff is WIP and there's some old code. The Darwin line is the most recently hacked on prompt. And note the sshk function which I use to carry the .bash_kylo file forward to move the prompt (and other stuff) to new hosts. All kinda hacky but works for now.
# Fun with prompts
# Ideas:
# http://www.maketecheasier.com/8-useful-and-interesting-bash-prompts/2009/09/04
# http://www.termsys.demon.co.uk/vtansi.htm
# http://slashdot.org/comments.pl?sid=108424&cid=9219400
#
RESET="\[\017\]"
NORMAL="\[\e[0m\]"
BRIRED="\[\e[1;31m\]"
@ferventcoder
ferventcoder / .bash-constants.sh
Last active July 29, 2020 18:51
Git bash setup
# Reset
Color_Off="\[\033[0m\]" # Text Reset
# Regular Colors
Black="\[\033[0;30m\]" # Black
Red="\[\033[0;31m\]" # Red
Green="\[\033[0;32m\]" # Green
Yellow="\[\033[0;33m\]" # Yellow
Blue="\[\033[0;34m\]" # Blue
Purple="\[\033[0;35m\]" # Purple
@lholman
lholman / Set-BuildNumber.ps1
Last active May 9, 2016 11:41
A psake task for managing assembly versioning in .NET applications
#*================================================================================================
#* Purpose: Sets the full build number ([major].[minor].[build].[revision]) in a consistent global way
#* for all builds. We purposefully only use TeamCity to generate the incrementing [build] number.
#* Set
#*================================================================================================
Task Set-BuildNumber {
$major = "1"
$minor = "0"
#Get buildCounter passed in from TeamCity, if not use zero
@nddrylliog
nddrylliog / winbrew.md
Last active December 20, 2015 16:19
Winbrew
@Thermionix
Thermionix / mount.iso.psm1
Last active November 15, 2022 10:39
powershell mount/unmount iso for all versions of windows
# Uses http://www.ltr-data.se/opencode.html/#ImDisk virtual disk driver for windows 7 or less
# Tries to use chocolatey to install imdisk
# Sample use case:
# Import-Module ".\mount.iso.psm1"
# Invoke-IsoExe "C:\test.iso" "setup.exe" "/passive"
function Mount-Iso([string] $isoPath)
{
if ( -not (Test-Path $isoPath)) { throw "$isoPath does not exist" }
@hlindberg
hlindberg / ticketmatch.rb
Created March 13, 2014 01:05
Script to match puppet tickets from git log with list from jira
# This script mangles the output from git log between two git references
# and matches this with a list of tickets from Jira.
#
# The List from Jira can be obtained by showing the list of issues for a release
# i.e. a query like this for the given release which gets all targeting the
# release in question:
#
# project = PUP AND fixVersion = "3.5.0" ORDER BY key ASC
#
# Then removing all columns from the output except key.
class acl {
acl { 'c:/temp':
owner => 'SYSTEM',
group => 'Administrators',
inherit_parent_permissions => 'false',
permissions => [ { 'identity' => 'BUILTIN\Administrators', 'rights' => ['full'] } ]
}
}
class registry {
@idavis
idavis / gist:c16f117c0f99eb20c49f
Created June 12, 2015 16:46
PowerShell Module Security

I was playing around with dynamic module creation and figured out how to monkey patch modules.

I then thought about how PowerShell is a Last-In-Wins language, and tried replacing private methods.

This led to the "what if" moment of pulling [secure data out of a loaded module][]. In this case, the username and password of a credential set.

This seems like a security issue to me, or am I being over sensitive?