This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# unifi_ssl_import.sh | |
# UniFi Controller SSL Certificate Import Script for Unix/Linux Systems | |
# by Steve Jenkins <http://www.stevejenkins.com/> | |
# Incorporates ideas from https://source.sosdg.org/brielle/lets-encrypt-scripts | |
# Version 2.2 | |
# Last Updated June 26, 2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
sign4j.c: a simple utility to sign executables created by Launch4j | |
Copyright (c) 2012 Grzegorz Kowal | |
Modified for Linux by Luke Spragg (Wulfspider), Dalton Pelc (Olloth), Contex, and raphfrk | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Public: Template to render views outside the context of a controller. | |
# | |
# Useful for rendering Rails 2.3.x views in rake tasks or background jobs when a | |
# controller is unavailable. | |
# | |
# Examples | |
# | |
# template = OfflineTemplate.new(:users) | |
# template.render("users/index", :layout => false, :locals => { :users => users }) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is sourced by /etc/init.d/sabnzbdplus | |
# | |
# When SABnzbd+ is started using the init script, the | |
# --daemon option is always used, and the program is | |
# started under the account of $USER, as set below. | |
# | |
# Each setting is marked either "required" or "optional"; | |
# leaving any required setting unconfigured will cause | |
# the service to not start. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VERSION=$(ls -t1 /boot/vmlinuz-* | cut -f 1 -d '-' --complement | head -1) | |
BOOT=/boot | |
KEXEC=/sbin/kexec | |
KERNEL=$BOOT/vmlinuz-$VERSION | |
INITRD=$BOOT/initramfs-$VERSION.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type InitFunction func() (interface{}, error) | |
type ConnectionPoolWrapper struct { | |
size int | |
conn chan interface{} | |
} | |
/** | |
Call the init function size times. If the init function fails during any call, then | |
the creation of the pool is considered a failure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node demo { | |
nagios::host::service { 'ping': | |
check_command => 'check_ping', | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augeas{ '/etc/fstab - nosuid on /sys': | |
context => "/files/etc/fstab", | |
changes => [ | |
"ins opt after /files/etc/fstab/*[file = '/sys']/opt[last()]", | |
"set *[file = '/sys']/opt[last()] nosuid", | |
], | |
onlyif => "match *[file = '/sys']/opt[. = 'nosuid'] size == 0", | |
} | |
augeas{ '/etc/fstab - acl on /sys': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $file = $ARGV[0] or die('Must pass an apache access logfile'); | |
open IN, "<$file" or die("Can't open $file"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($this->_getModels() as $model) { | |
$columns = array(); | |
$primaries = array(); | |
foreach ($model['columns'] as $columnName => $column) { | |
if (isset($column['is_primary']) && $column['is_primary']) { | |
$primaries = $columnName; | |
} |