Skip to content

Instantly share code, notes, and snippets.

View iversond's full-sized avatar

Dan Iverson iversond

View GitHub Profile
@rgl
rgl / try-vagrant-triggers-experimental.rb
Created May 27, 2019 21:50
an example on how to see which vagrant triggers exist
# NB before running this you need to export an environment variable: export VAGRANT_EXPERIMENTAL='typed_triggers'
# see https://www.vagrantup.com/docs/triggers/configuration.html#trigger-types
# NB to see all triggers you need to edit your vagrant source code:
# sudo vim /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/plugin/v2/trigger.rb
# and add a @ui.info to see all trigger action stages, et all:
# NB see https://github.com/hashicorp/vagrant/blob/v2.2.4/lib/vagrant/plugin/v2/trigger.rb
# # Fires all triggers, if any are defined for the action and guest. Returns early
# # and logs a warning if the community plugin `vagrant-triggers` is installed
# #
# # @param [Symbol] action Vagrant command to fire trigger on
@mefellows
mefellows / ec2-user-data.ps1
Last active May 28, 2021 11:44
Packer Community Plugins - Example Windows 2012 Setup
<powershell>
write-output "Running User Data Script"
write-host "(host) Running User Data Script"
cmd.exe /c net user /add vagrant FooBar@123
cmd.exe /c net localgroup administrators vagrant /add
Set-ExecutionPolicy -ExecutionPolicy bypass -Force
# RDP
@philipsd6
philipsd6 / install-tmux
Last active February 22, 2021 14:41 — forked from rothgar/install-tmux
Install tmux 2.3 on rhel/centos 7
# Install tmux on rhel/centos 7
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xvzf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
@donaldguy
donaldguy / Rockerfile
Created August 15, 2016 18:30
jordan/rundeck + kindlyops oauth2 proxy with roles
#build us a binary for https://github.com/bitly/oauth2_proxy/pull/277
FROM golang
WORKDIR /go/src/github.com/bitly
RUN git clone https://github.com/kindlyops/oauth2_proxy.git
WORKDIR /go/src/github.com/bitly/oauth2_proxy
RUN git checkout github-teams-tweaks
RUN go get
# include patch from https://github.com/bitly/oauth2_proxy/pull/295
RUN curl https://github.com/donaldguy/oauth2_proxy/commit/8965e6b58a3afd8ad9f0f326f91b25253c88d523.patch | git apply --apply -
RUN go build
@accasey
accasey / update_psoprdefn.sql
Created May 30, 2019 15:19
Updates to PSOPRDEFN handling the VERSION
UPDATE PSVERSION SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME IN ('UPM','SYS')
/
UPDATE PSLOCK SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME = 'UPM'
/
DELETE FROM PSROLEUSER WHERE ROLEUSER = :1 AND ROLENAME LIKE '%%'
/
UPDATE PSOPRDEFN SET VERSION = (SELECT VERSION
FROM PSVERSION
WHERE OBJECTTYPENAME = 'UPM'
)
@tslater2006
tslater2006 / config.json
Created August 2, 2019 01:01
Sample Pivet Config
{
"Environments": [
{
"Name": "MyEnvironment",
"Connection": {
"Provider": "Bootstrap",
"TNS": "DBNAME",
"TNS_ADMIN": "C:\\app\\oracle\\product\\12.2.0\\client_1\\network\\admin",
"Schema": "SYSADM",
"BootstrapParameters": {
@rshk
rshk / kibana-apache-logs.json
Created May 6, 2014 16:16
Kibana: analyze Apache logs
{
"title": "Apache logs",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,
@echo off
REM PeopleTools Object Type export script
REM Find object type numbers
REM Definition Type Selections on PeopleTools 8.54: Application Designer Developer's Guide - Appendix B
REM https://docs.oracle.com/cd/E55244_01/psft/acrobat/pt854tapd-b0714.pdf
REM example - To create a project via application designer containing all PTF objects (104=Test Definitions,105=Test Framework Test Cases)
set pside=E:\apps\psoft\PT85509\bin\client\winx86\pside.exe
set export_path=E:\TEMP\out\export
set log_path=E:\TEMP\out
@a-h
a-h / 11-weblogic.rb
Created June 11, 2015 14:38
WebLogic Logstash Filter
filter {
## WebLogic Server Http Access Log
if [type] == "weblogic-access" {
grok {
match => [ "message", "%{IP:client} - - \[(?<timestamp>%{MONTHDAY}[./-]%{MONTH}[./-]%{YEAR}:%{TIME}\s+%{ISO8601_TIMEZONE})] \"%{WORD:verb} %{URIPATHPARAM:uri}\s+HTTP.+?\" %{NUMBER:status} %{NUMBER:response_time}" ]
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
@ericbisme
ericbisme / hiera.yaml
Last active August 7, 2017 18:32
hiera.yaml
# managed by puppet
---
:backends:
- eyaml
- yaml
:logger: console
:hierarchy:
- "nodes/%{::clientcert}"