This file contains hidden or 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/bash | |
# Split URLs by comma | |
urls=${1//,/ } | |
for url in $urls | |
do | |
hostname="${url%%/*}" | |
if [[ "$url" = */* ]] | |
then |
This file contains hidden or 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
/path/to/*.log { | |
size 10M | |
rotate 10 | |
create | |
compress | |
delaycompress | |
dateext | |
dateformat -%Y%m%d-%s | |
} |
This file contains hidden or 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/bash | |
grep nrpe /var/log/audit/audit.log | audit2allow -M local | |
semodule -i local.pp |
This file contains hidden or 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;/path/to/name |
This file contains hidden or 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/bash | |
set -e | |
monthday="$(date +%-d)" | |
weekday="$(date +%w)" | |
if [[ "$monthday" -eq 1 ]] | |
then |
This file contains hidden or 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 | |
/* | |
* Prevent automated POST (actually non-GET) requests by checking a form | |
* attribute set by JavaScript, in the hope that spammers will not execute | |
* JavaScript. | |
* | |
* Usage: | |
* 1. Extend MyFormModel instead of CFormModel | |
* class ContactForm extends MyFormModel {} |
This file contains hidden or 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
for i in $(virsh list | grep running | awk '{print $2}') | |
do | |
virsh autostart $i | |
done | |
for i in $(virsh list --all | grep 'shut off' | awk '{print $2}') | |
do | |
virsh autostart --disable $i | |
done |
This file contains hidden or 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
[twistd] | |
user munin |
This file contains hidden or 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
benchmarking repmat/useRepmat whnf | |
time 112.9 ms (111.7 ms .. 113.7 ms) | |
1.000 R² (1.000 R² .. 1.000 R²) | |
mean 113.3 ms (112.8 ms .. 113.9 ms) | |
std dev 724.5 μs (504.6 μs .. 955.7 μs) | |
variance introduced by outliers: 11% (moderately inflated) | |
benchmarking repmat/useReplicate whnf | |
time 101.6 ms (99.19 ms .. 104.0 ms) | |
0.999 R² (0.996 R² .. 1.000 R²) |
This file contains hidden or 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
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Data.StrictList where | |
import qualified Control.Foldl as L | |
import qualified GHC.Exts | |
import Control.Foldl (Fold (Fold)) |