Skip to content

Instantly share code, notes, and snippets.

View PaulusTM's full-sized avatar
🦄
Unicorn Power

Daniel Paulus PaulusTM

🦄
Unicorn Power
View GitHub Profile
@PaulusTM
PaulusTM / christmas.md
Created December 15, 2019 20:45
Card for the 25daysofserverless solution

Hi Buddy,

Hope that Santa brings you a cool race car and lots of other cool stuff!

Love,

Dad

@PaulusTM
PaulusTM / DecryptJenkinsCredentials.groovy
Created October 14, 2019 19:55 — forked from sirrapa/DecryptJenkinsCredentials.groovy
Iterate and decrypt credentials (Security Breach!!!!)
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
com.cloudbees.plugins.credentials.Credentials.class,
Jenkins.instance,
null,
null
)
for(c in creds) {
println(String.format("%s --> %s: %s",c, c.id, c.description))
// if(c instanceof com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey){
@PaulusTM
PaulusTM / starwars.http
Last active January 31, 2019 14:11
This file is an example on how the use the Visual Studio Code REST Client plugin
### Search for the details of Luke Skywalker
# @name search
GET https://swapi.co/api/people/?search=luke HTTP/1.1
content-type: application/json
### Find the homeworld based on returned search details
# @name planet
GET {{search.response.body.$.results[0].homeworld}} HTTP/1.1
Content-Type: application/json
#cloud-config
---
hostname: {{VM_NAME}}
ssh_authorized_keys:
- ssh-rsa ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCX9ib81tx38a+I6FUQnG5iQMY/55nsbcvEATU2BQ//dK20/eRBAcDwV6Avswa6pAzf0uMueNi0ypOAAPtSKpAP5ohjoy5gN7Fd47hbCcnbcd1Nm3Q2nPsjDQz7oIc4DQwG+JLBytS1eTjQ/c6gSx3UW9+GJs7vuhdB3zi7+AzQM5qFEy11ZwNbf783LjKB7KunyUKmXF07sGqBjCkIP0KiQ8UnGyAcjt3ViRDuYiSfNoShYrWOGOeY5fH84eYTOS0dp6wciJVB15XasCKz0syqCadecHOV6fpX5w3x8xljitrbFjehHGquXLC2YM0oy3CvDhTY+detdvgbFjt+dMc5 dpaulus@DESKTOP-EKTG7IU
coreos:
etcd2:
name: {{VM_NAME}}
discovery: {{ETCD_DISCOVERY_TOKEN}}
@PaulusTM
PaulusTM / get-projects.py
Created August 18, 2017 14:24
Get Octopus projects
import requests
root_url = "<root_uri>"
api = "/api/projectgroups/all"
headers = {'X-Octopus-ApiKey':'<key>'}
response = requests.get(root_url+api, headers=headers)
projectgroups = response.json()
for group in projectgroups:
@PaulusTM
PaulusTM / knife cheat
Created December 11, 2015 10:50 — forked from ipedrazas/knife cheat
Hello!
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
@PaulusTM
PaulusTM / knife.rb
Last active September 16, 2015 09:58 — forked from garystafford/knife.rb
Gists for blogpost, 'Configure Chef on Windows for a Proxy Server': http://wp.me/p1RD28-11w. Settings for knife.rb file when using a proxy server from a Windows host. Set environment variables manually or use the Windows' command 'setx VARIABLE value'. You must close the current windows prompt and open a new one to see the SETX changes (env | gr…
# See http://docs.opscode.com/config_rb_knife.html
# for more information on knife configuration options
# Knife expects USERNAME, USERDNSDOMAIN, PASSWORD, PROXY_SERVER,
# and PROXY_PORT environment variables to be set at runtime.
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "chef_user_here"
client_key "#{ENV['HOME']}/.chef/chef_client_here.pem"
@PaulusTM
PaulusTM / Vagrantfile
Created July 31, 2015 20:48
Supermarket package singing issue
Vagrant.configure(2) do |config|
config.vm.box = "chef/centos-6.5"
config.vm.define "server" do |s|
s.vm.network "private_network", ip: "10.10.10.10"
s.vm.provider "virtualbox" do |vb|
vb.cpus = 2
vb.memory = "2048"
#[root /etc/rsyslog.d]# cat 12-nagios.conf
$ModLoad imfile
$InputFilename /var/log/nagios/nagios.log
$InputFileStateFile .nagios.rsyslog
$InputFileTag nagios.log
$InputFileFacility local6
$InputFileSeverity info
$InputRunFileMonitor
@PaulusTM
PaulusTM / gist:f5ab7f74c9394d918f32
Created January 27, 2015 11:45
Chef server on Amazon Linux stacktrace
Recipe: private-chef::add_ons_remote
* yum_repository[chef-stable] action createRecipe: <Dynamically Defined Resource>
* template[/etc/yum.repos.d/chef-stable.repo] action create
- create new file /etc/yum.repos.d/chef-stable.repo
- update content in file /etc/yum.repos.d/chef-stable.repo from none to 8d23f9
--- /etc/yum.repos.d/chef-stable.repo 2015-01-27 10:31:55.732801314 +0000
+++ /tmp/chef-rendered-template20150127-3095-182oldv 2015-01-27 10:31:55.732801314 +0000
@@ -1 +1,12 @@
+# This file was generated by Chef
+# Do NOT modify this file by hand.