View sslcrl.check.sh
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 | |
# | |
# script: sslcrl.check | |
# version: 1.0 | |
# author: David Lundgren <dlundgren@syberisle.net> | |
# description: Checks the given CRL for data | |
# license: MIT | |
# | |
# DETAIL: | |
# This script uses curl to get the CRL located at the URL, and then openssl to check the CRL attributes. |
View setup-ezjail.yml
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
--- | |
- name: install python | |
raw: test -e /usr/local/bin/python || (pkg install -y python) | |
changed_when: False | |
- name: reload facts | |
setup: | |
# | |
# Instructions for setting up a jail |
View ResolveDependencies.php
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 | |
namespace Assets; | |
use Assetic\Asset\AssetCollection; | |
use Assetic\Asset\AssetReference; | |
use Assetic\AssetManager; | |
class ResolveDependencies | |
{ |
View generate-cacert
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 | |
CERT_PATH=$(python3 -m certifi) | |
security find-certificate -a -p /Library/Keychains/System.keychain > ${CERT_PATH} | |
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> ${CERT_PATH} |
View zabbix-slack.php
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 php | |
<?php | |
/** | |
* Slackify Zabbix Alerts | |
* | |
* @copyright 2019, David Lundgren <dlundgren@syberisle.net> | |
* @license MIT | |
*/ | |
function get_key($argv, $pos, $shopts, $lopts) | |
{ |
View manual-gs-9.25.yml
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
--- | |
- hosts: all | |
gather_facts: no | |
become: yes | |
vars: | |
packages_manual: | |
- libgs9-common_9.25~dfsg+1-0ubuntu0.16.04.3_all.deb | |
- libgs9_9.25~dfsg+1-0ubuntu0.16.04.3_amd64.deb | |
- ghostscript_9.25~dfsg+1-0ubuntu0.16.04.3_amd64.deb | |
tasks: |
View ContextResolver.php
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 | |
/** | |
* | |
* This file is part of Aura for PHP. | |
* | |
* @license http://opensource.org/licenses/MIT MIT | |
* | |
*/ | |
use Aura\Di\Resolver\Resolver; |
View IsStaticProxy.php
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 | |
/** | |
* Simple static proxy trait | |
* | |
* Aura DI is used for lazy loading | |
* | |
* Set `const PROXY_IDENTIFIER = "SomeClass" in your proxy class, and use this trait. | |
* | |
* Call `Some\Proxy\SomeClass::register(new SomeClassInstance)` to have it register the alias. | |
* |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View thoughtful_array_diff.php
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 | |
/** | |
* Similar to array_diff() but works with the base multidimensional arrays | |
* | |
* @params array ... | |
* @return array | |
*/ | |
function arrayDiff() | |
{ | |
$arys = func_get_args(); |
NewerOlder