Skip to content

Instantly share code, notes, and snippets.

@oofnikj
oofnikj / answerfile
Last active November 15, 2024 20:14
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@mskutin
mskutin / Jenkinsfile
Created December 13, 2017 11:32 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
@Neo23x0
Neo23x0 / audit.rules
Last active September 16, 2024 14:59
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@antonizoon
antonizoon / init.pp
Created October 16, 2017 18:16
Quick ssh setup example Puppet
# The absolute minimum that any new server set up needs.
# make sure that any sensitive (password hashes) and non code data is in hiera.
# SSH authorized_keys function to authorized multiple SSH keys
# https://serverfault.com/a/316292
define authorized_keys ($sshkeys, $ensure = "present", $home = '') {
# This line allows default homedir based on $title variable.
# If $home is empty, the default is used.
$homedir = $home ? {'' => "/home/${title}", default => $home}
@bhamilton
bhamilton / puppet-check.sh
Created February 14, 2017 21:54 — forked from bpholt/puppet-check.sh
Puppet Module Syntax Check, Lint, Run Tests, and ERB Syntax Check. There is almost certainly a better way to do this.
#!/bin/bash
# Run from the base directory of your Puppet module
echo ===================
echo Parser Validation
echo ===================
find . -name "*.pp" | xargs -n 1 -t puppet parser validate
echo ===================
echo Linting
@ipcrm
ipcrm / fileserver.pp
Created December 19, 2016 21:41
apache example
class profile::fileserver (
$user = 'root',
$group = 'root',
) {
include 'stdlib'
include 'apache'
ensure_resource('file', '/opt/fileserver', { 'ensure' => 'directory', 'owner' => "${user}", 'group' => "${group}"})
@ipcrm
ipcrm / sysctl.pp
Last active February 14, 2018 21:01
sysctl
class profile::sysctl (
String $ip_forward = '0',
String $tcp_max_syn_backlog = '1280',
String $accept_source_route = '0',
String $icmp_echo_ignore_broadcasts = '1',
String $rp_filter = '1',
String $all_secure_redirects = '0',
String $all_accept_redirects = '0',
String $default_secure_redirects = '0',
String $default_accept_redirects = '0',
class ws::sudo {
package { "sudo":
ensure => 'present'
}
file { ['/etc/sudoers']:
ensure => file,
owner => '0',
group => '0',
# A quick manifest to install vim-puppet and puppet-lint
#
# I use it when I'm standing up a random VM that I need to write puppet code on.
#
# It's also being used to troubleshoot this issue : https://tickets.puppetlabs.com/browse/PUP-6713
#
# Perhaps someday this will grow up into a full-fledged module, but now it's just the right size since it can just
# be copied and puppet apply'd.
#
# Please note that if running on a Puppet 3 system, you'll need to (temporarily) enable the future parser by adding parser=future in
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc