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
#include <stdio.h> | |
#include <unistd.h> | |
int main() | |
{ | |
printf ("kill -9 <parent>\n"); | |
kill (getppid(), 9); | |
} |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import argparse | |
import boto | |
import boto.provider | |
import boto.sdb | |
import getpass | |
import os | |
import signal | |
import subprocess |
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/bash | |
if (( $# < 1 )) | |
then | |
echo "Usage: $0 username" | |
exit 1 | |
fi | |
username="$1" | |
json_left='{"input01":{"Input":"GmailAddress","GmailAddress":"' |
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
echo "oscap xccdf eval --profile usgcb-rhel6-server" | |
oscap xccdf eval --profile usgcb-rhel6-server \ | |
--results /var/www/govready-html/usgcb-rhel6-server.xml \ | |
--report /var/www/govready-html/usgcb-rhel6-server.html \ | |
--cpe /usr/share/xml/scap/ssg/content/ssg-rhel6-cpe-dictionary.xml \ | |
/usr/share/xml/scap/ssg/content/ssg-rhel6-xccdf.xml ; true | |
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/python3 | |
""" Obtaining all form fields (dynamically) from a POST request. | |
$ curl http://127.0.0.1:8000/post -d "name=Nemo&country=Norway" | |
$ curl http://127.0.0.1:8000/data -d "company=Axos Inc.&business=IT Outsourcing" | |
""" | |
from flask import abort, Flask, jsonify, request | |
__author__ = "@ivanleoncz" |
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
aptitude install -y build-essential | |
wget "http://downloads.sourceforge.net/project/e1000/ixgbevf stable/2.11.3/ixgbevf-2.11.3.tar.gz" | |
tar -zxf ./ixgbevf-* | |
cd ixgbevf*/src | |
make install | |
modprobe ixgbevf | |
sudo update-initramfs -c -k all | |
echo "options ixgbevf InterruptThrottleRate=1,1,1,1,1,1,1,1" > /etc/modprobe.d/ixgbevf.conf |
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
## Check if variable is defined | |
# Replaces has_variable?(var) and if @var variations. | |
# include?() pattern from @Jan_vStone. | |
# | |
# scope.lookupvar return values for undefined variables: | |
# Puppet 3.x: nil | |
# Puppet 2.6.x: :undefined | |
# Puppet 2.7.x: :undefined | |
<% if ! [:undefined, nil, ''].include?(masquerade_address = scope.lookupvar('ftp::masquerade_address')) -%> | |
MasqueradeAddress <%= masquerade_address %> |
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
[client] | |
default-character-set = utf8mb4 | |
[mysql] | |
default-character-set = utf8mb4 | |
[mysqld] | |
character-set-server = utf8mb4 | |
collation-server = utf8mb4_unicode_ci |
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 method is responsible for creating the Jenkins job. | |
* @param jobName jobName | |
* @param timerConfig cron expression to schedule the job | |
* @return | |
*/ | |
def createJenkinsJob(def jobName, def timerConfig) { | |
echo "Creating the job ${jobName}" | |
// Here I'm using a shared library in the pipeline, so I have loaded my shared library here |
OlderNewer