Skip to content

Instantly share code, notes, and snippets.

View pmoranga's full-sized avatar

Pmoranga pmoranga

View GitHub Profile
@abhishekkr
abhishekkr / $conf_dir puppet.conf
Last active December 6, 2024 10:29
Puppet Module : No Code In Data ~ using PuppetDB in masterless puppet
[main]
storeconfigs = true
storeconfigs_backend = puppetdb
reports = store,puppetdb
pluginsync = true
@sungamagnus
sungamagnus / webtail.py
Last active October 31, 2016 19:21 — forked from scoffey/webtail.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTTP server that provides a web interface to run "tail" on a file,
like the Unix command.
This is a standalone script. No external dependencies required.
How to invoke:
@harunyardimci
harunyardimci / mongo_backup.sh
Last active September 22, 2022 03:18
mongo backup
#!/bin/bash
#
#=====================================================================
#=====================================================================
# Username to access the mongo server e.g. dbuser
# DBUSERNAME=""
# Username to access the mongo server e.g. password
# DBPASSWORD=""
@dataolle
dataolle / sendxbmc.sh
Created December 4, 2012 18:50
send url to xbmc's json-rpc service for playback on the big screen
#!/bin/bash
#set url and port to the xbmc box webservice
XBMC_HOST="http://127.0.0.1:8080"
if [ "$1" = "" ]; then
echo -n "Insert URL: "
read url
else
url="$1"
fi
@jedi4ever
jedi4ever / gist:3698451
Created September 11, 2012 13:26
Puppet loop over hash and pass array of args to sysctl
Exec { path => '/usr/bin:/usr/sbin/:/bin:/sbin' }
$sysctl_settings = {
# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
"net.ipv4.ip_forward" => 1 ,
"net.ipv6.conf.default.forwarding" => 1 ,
"net.ipv6.conf.all.forwarding" => 1 ,
"net.ipv4.conf.default.proxy_arp" => 0 ,
# Enables source route verification
@abhishekkr
abhishekkr / common.csv
Created September 9, 2012 12:07
Puppet Module : No Code In Data ~ Externalize Data into separately managed CSV files
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2 in line 1.
# $MANIFESTPATH/extdatadir/common.csv
httpd_conf_dir,/etc/httpd/conf.d
httpd_is_cgi,true
httpd_git_path,/var/www/git
httpd_git_url,/mygit
@Thermionix
Thermionix / auth-basic.conf
Last active November 4, 2021 00:56
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@jeffmccune
jeffmccune / puppet_multiple_ca.md
Created July 5, 2012 19:03
Puppet Multiple CA's

Standard CA Bundle

This CA bundle is located at puppet master --confdir=$PUPPET_CONFDIR --configprint localcacert and contains CA certs in the following order:

  1. Root CA
  2. Signing CA
  3. Puppet Master CA 1
  4. Puppet Master CA 2

The following error may be resolved by changing the CA certificate order in the bundle to be:

@mmrwoods
mmrwoods / new_linode_centos6.markdown
Created February 7, 2012 11:39
Make me a new CentOS linode

Make me a new CentOS linode

Notes:

  • Instructions written for CentOS 6.3
  • Change, me, myhost, myip etc. to your username, hostname, ip address and so on.
  • Run all commands as root unless otherwise directed.
  • You might want to look at mounting /var and /home on separate partitions.
  • I've just allowed all members of the wheel group to operate as root. This is the height of laziness and highlights the fact that I'm just a developer that's stolen a sysadmin's