Skip to content

Instantly share code, notes, and snippets.

Go Phillies!

Tim Ski marshyski

Go Phillies!
View GitHub Profile
marshyski / jenkins-api-examples
Last active Jul 7, 2021
Jenkins trigger, create and remove jobs and folders
View jenkins-api-examples
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user
# create folder
marshyski / iptables
Last active Dec 17, 2020
DigitalOcean IPTables
View iptables
:INPUT ACCEPT [235:14024]
:OUTPUT ACCEPT [418:29744]
:OUTPUT ACCEPT [229:47805]
marshyski / Windows 10 Gaming
Last active Nov 10, 2020
Windows 10 Gaming Optimizations
View Windows 10 Gaming

Windows 10 Gaming Performance

Tested On: MSI GS66 Stealth 10SFS-037 Laptop | Intel i7-10750H | Nvidia RTX 2070 Super

Date Updated: 28JUN2020

Est. Time to Completion: 1 hour

Expected improvement from stock Windows 10 install for gaming is 1-3x network improvement and reduction in OS overhead.

marshyski /
Last active Oct 7, 2020
Example of terraform with multiple security groups
variable "aws_region" {
default = "us-east-1"
variable "rhelami" {
default = {
us-east-1 = "ami-436a702a"
marshyski /
Last active Aug 11, 2020
Puppet DB Curl Examples
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]'
curl -sf 'http://localhost:8080/v3/facts'
curl -sf 'http://localhost:8080/v3/nodes'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]'
marshyski /
Last active Jun 21, 2020
yum-nginx-api 2020 v1 proposal

Move API routes:

Old New
/api/health /v1/health
/api/upload /v1/rpm/upload /v1/deb/upload
/api/repo /v1/rpm/repo /v1/deb/repo

/rep will default to a single repo/xml directory. The goal would be manage multiple repos by utlizing a name query parameter as such:

marshyski /
Last active Mar 20, 2019
LuaJIT and luarocks on Mac OS X El Capitan
# This is to install both on OS X if you don't want to use homebrew
# xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcode-select --install
curl -O
cd LuaJIT-2.0.4
make && make install
curl -O
marshyski / mssql.pp
Created Nov 20, 2015
Basic SQL Install with Puppet
View mssql.pp
# Class to install SQL Server, set its configuration, create an
# instance, as well as a sample DB.
class app_sqlserver (
$source = 'F:/',
$admin_user = 'Administrator',
$db_instance = 'MYINSTANCE',
$sa_pass = 'MySecretPASSWORD',
$db_name = 'sampledb',
) {
marshyski /
Created Mar 26, 2015
MCollective Examples
# Swtich to user to use MCO out of the box
sudo -i -u peadmin
# Find all servers in master catalog
mco find
# Find all servers in master catalog and run class reboot
mco find -C reboot
# Find all servers with puppet fact ec2_ami_id