Skip to content

Instantly share code, notes, and snippets.

Avatar
Go Phillies!

Tim Ski marshyski

Go Phillies!
View GitHub Profile
@marshyski
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 user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder
@marshyski
marshyski / iptables
Last active Dec 17, 2020
DigitalOcean IPTables
View iptables
*nat
:PREROUTING ACCEPT [235:14024]
:INPUT ACCEPT [235:14024]
:OUTPUT ACCEPT [418:29744]
:POSTROUTING ACCEPT [418:29744]
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [229:47805]
@marshyski
marshyski / Windows 10 Gaming Performance.md
Last active Nov 10, 2020
Windows 10 Gaming Optimizations
View Windows 10 Gaming Performance.md

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
marshyski / terraform-example.tf
Last active Oct 7, 2020
Example of terraform with multiple security groups
View terraform-example.tf
variable "aws_region" {
default = "us-east-1"
}
variable "rhelami" {
default = {
us-east-1 = "ami-436a702a"
}
}
@marshyski
marshyski / puppetdb-curl.sh
Last active Aug 11, 2020
Puppet DB Curl Examples
View puppetdb-curl.sh
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
marshyski / yum-nginx-api-v1-proposal.md
Last active Jun 21, 2020
yum-nginx-api 2020 v1 proposal
View yum-nginx-api-v1-proposal.md

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
marshyski / luajit-luarocks-osx.sh
Last active Mar 20, 2019
LuaJIT and luarocks on Mac OS X El Capitan
View luajit-luarocks-osx.sh
# 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 http://luajit.org/download/LuaJIT-2.0.4.zip
unzip LuaJIT-2.0.4.zip
cd LuaJIT-2.0.4
make && make install
curl -O http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz
@marshyski
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',
) {
View mac-setup.md
@marshyski
marshyski / mco-examples.sh
Created Mar 26, 2015
MCollective Examples
View mco-examples.sh
# 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