snmp_rndc_stats - extend rndc(8) stats for snmpd(8) daemon
This program will read DNS statistics written by rndc(8) stats. This
| user c["username"] do | |
| comment c["username"] | |
| system true | |
| shell "/usr/bin/git-shell" | |
| home "/srv/datas/#{c['username']}" | |
| manage_home true | |
| action :create | |
| end | |
| c_home = File.expand_path("/srv/data/#{c['username']}") |
| # Partial snippet of oracle recipe. | |
| template "/etc/security/limits.d/oracle.conf" do | |
| owner "root" | |
| group "root" | |
| mode "0644" | |
| source "oracle-limits.conf.erb" | |
| end |
| # For 10g R1 and R2 databases it's important to convert DB_CACHE_SIZE and DB_xK_CACHE_SIZE parameters to DB_BLOCK_BUFFERS, and to remove SGA_TARGET if set. | |
| # Otherwise you will get errors like these: ORA-00385: cannot enable Very Large Memory with new buffer cache parameters | |
| # See: http://www.puschitz.com/TuningLinuxForOracle.shtml#ConfiguringVeryLargeMemory | |
| use_indirect_data_buffers=true | |
| db_block_size=8192 | |
| db_block_buffers=524288 | |
| shared_pool_size=4294967296 |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Net::LDAP; | |
| my $userid = 'cn=username,cn=Users,dc=contoso,dc=com'; | |
| my $password = 'password'; | |
| my $domain = 'contoso.com'; | |
| my $base = 'cn=Users,dc=contoso,dc=com'; | |
| my @attributes = ("userPrincipalName"); |
| #!/bin/bash | |
| # Find command says find sda to sdz in /dev, but not sda or sdb. | |
| # xargs -P argument controls number of parallel processes. | |
| # xargs -i uses {} as a variable place holder for drive letters. | |
| find /dev -name "sd[a-z]" ! -name "sd[a-b]" -print0 | xargs -0 -P 0 -i dd if=itutility.img of={} |
| #!/usr/bin/php | |
| <?php | |
| function testForExploit($strUrl = NULL) { | |
| // I would love to use “filter_var($strLongUrl, FILTER_VALIDATE_URL)” here, | |
| // but let us be honest, it sucks even more than regular expressions do. | |
| // (http://snipplr.com/view/14198/useful-regex-functions/) | |
| if (!preg_match('/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i', $strUrl)) { | |
| return false; | |
| } | |
| $oCurl = curl_init($strUrl); |
| # If x86 | |
| if node[:kernel][:machine] =~ /^(x|i[3456])86$/i | |
| # Do something | |
| end | |
| # If amd64/x86_64 (same thing) | |
| if node[:kernel][:machine] =~ /^(x86_|amd)64$/i | |
| # Do something | |
| end |
| #! /bin/bash | |
| # Tomcat init script for Linux | |
| # | |
| # chkconfig: 2345 96 14 | |
| # description: The Apache Tomcat servlet/JSP container. | |
| # processname: tomcat | |
| ### BEGIN INIT INFO | |
| # Provides: tomcat |
| <%# Splits an alias attribute mapping like "u01:36842b2b0005bb541000003303bdfe0cc" %> | |
| <% unless node["multipath"]["aliases"].empty? -%> | |
| multipaths { | |
| <% node["multipath"]["aliases"].each do |alias_def| -%> | |
| <% alias_arr = alias_def.split(/:/) -%> | |
| multipath { | |
| wwid <%= alias_arr[1] %> | |
| alias <%= alias_arr[0] %> | |
| } |