Skip to content

Instantly share code, notes, and snippets.

View mutable.pp
class classtest1 ($classfoobar) {
inline_template('<% @classfoobar.each {|i| i.upcase! } %>')
notice($classfoobar)
}
class classtest2 ($classfoobar) {
inline_template('<% @classfoobar.each {|i| i.upcase! } %>')
notice($classfoobar)
}
class classtest3 ($classfoobar = ['foo', 'bar']) {
inline_template('<% @classfoobar.each {|i| i.upcase! } %>')
@b4ldr
b4ldr / console.log
Created Jan 10, 2022
scrap dell drivers
View console.log
$ ./dell.py -vvvv poweredge-r430 [14:52:33]
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.dell.com:443
DEBUG:urllib3.connectionpool:https://www.dell.com:443 "GET /support/home HTTP/1.1" 301 0
DEBUG:urllib3.connectionpool:https://www.dell.com:443 "GET /support/home/en-uk HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://www.dell.com:443 "GET /support/driver/en-uk/ips/api/driverlist/fetchdriversbyproduct?productcode=poweredge-r430&oscode=RHEL8 HTTP/1.1" 200 None
Seagate ST5A for model number(s) DL1800MM0159 and DL2400MM0159.:
15 Dec 2021
https://dl.dell.com/FOLDER07629076M/1/SAS-Drive_Firmware_T5GTX_LN64_ST5A_A00.BIN
This release contains firmware version CSJ8 for STX drives. Vendor model numbers ST4000NM017A, ST2000NM013A, ST1000NM005A.:
View example.sql
SELECT hosts.host
FROM ((hosts
INNER JOIN host_resources on hosts.id = host_resources.host_id
INNER JOIN resources on resources.id = host_resources.resource_id))
WHERE resources.name = 'Motd';
View host.yaml
mongodb::dbs:
testdb:
user: user1
password_hash: a15fbfca5e3a758be80ceaf42458bcd8
View test.c
#include <stdio.h>
#include <curl/curl.h>
#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
CURLcode cas_curl_ssl_ctx(CURL *curl, void *sslctx, void *parm)
{
View gsuite.py
#!/usr/bin/env python3
"""A simple example of how to access the Google Analytics API."""
from argparse import ArgumentParser
from apiclient.discovery import build
from google.oauth2 import service_account
def get_args():
View foo.rb
class Foo
@@count = 1
def self.count
@@count
end
def self.increment
@@count += 1
end
end
Puppet::Functions.create_function(:'test::foo') do
View test.pp
class resolv {
case $hostname {
/^[Abc]/: {
resolv::resolv_config { 'Default':
domain => "mydomain.local",
}
}
}
}
View bash.sh.erb
<% if @test -%>
command0
<%- if @test2 -%>
command1
command2
command3
<%- end -%>
<%- end -%>
View sqlite.pp
class sqlite {
file{'/usr/local/share/myschema.sql':
ensure => file,
content => file('sqlite/myschema.sql')
}
exec{'sqllite3 /path/to/db.sql < /usr/local/share/myschema.sql':
refreshonly => true
subscribe => File['/usr/local/share/myschema.sql']
}
}