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
@package {"iptables": } | |
class foo { | |
package {"fail2ban": require=>Package['iptables']} | |
} | |
class bar { | |
file {"rc.local": require=>Package['iptables']} | |
} |
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
notice("IS_VIRTUAL: $is_virtual.") | |
env_setting { "GRUB_TIMEOUT": | |
file => "/etc/default/grub", | |
value => $is_virtual ? { | |
true => 0, | |
default => 5, | |
} | |
} |
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 | |
pkgname=openldap | |
pkgdir="$PWD"/.pkg-openldap | |
pkgver=2.4.35-152-g494ca7d | |
pkgrel=2 | |
makedeps=(libssl-dev libltdl-dev libdb-dev libsasl2-dev libperl-dev) |
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
/net | |
└── switches | |
└── switch1 | |
├── flows | |
│ └── f1 | |
│ ├── action.ip_dst | |
│ ├── action.ip_proto | |
│ ├── action.ip_src | |
│ ├── action.mac_dst | |
│ ├── action.mac_src |
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 | |
dev=/dev/disk/by-partlabel/$(hostname -s)-crypt-root | |
key=/boot/key | |
grubcfg=/boot/grub/grub.cfg | |
usage() { | |
local arg0=$(basename "$0") | |
cat <<-EOF | |
usage $arg0 add|rm [dev] |
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
static Map<Long,RouteTable> calc_all_routes(Logger log, Graph graph) | |
{ | |
// Initialize a new routing tables | |
Map<Long,RouteTable> new_tbl = new Hashtable<>(); | |
Map<String, PathFinder> paths = new Hashtable<>(); | |
for (String s : graph.vertices()) { | |
paths.put(s, new PathFinder(graph, 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
/** | |
* AVL hashmap | |
* | |
* This is used to map file descriptors from | |
**/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <errno.h> |
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
/** | |
* AVL hashmap | |
* | |
* This is used to map file descriptors from | |
**/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <errno.h> |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <sys/inotify.h> | |
#include <linux/fcntl.h> |
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
#!/usr/bin/python2 | |
# largely taken from python examples | |
# http://docs.python.org/library/email-examples.html | |
import os | |
import sys | |
import smtplib | |
# For guessing MIME type based on file name extension | |
import mimetypes |
NewerOlder