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 | |
# ./convert_ploop_to_simfs.sh VEID | |
# chmod +x convert_ploop_to_simfs.sh | |
rsync_options='-aHAX --progress --stats --numeric-ids --delete' | |
partition='vz' | |
if [ ! -e /etc/vz/conf/$1.conf ]; then | |
echo "Virtual server configuration file: /etc/vz/conf/$1.conf does not exist." | |
exit 1 | |
fi | |
if [ ! -d /$partition/private/$1/root.hdd ]; then |
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
require 'ipaddr' | |
IPAddr.new("192.168.0.1").to_i | |
=> 3232235521 | |
IPAddr.new(3232235521, Socket::AF_INET).to_s | |
=> "192.168.0.1" |
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
FROM erlang:22-alpine | |
# install packages | |
RUN apk update && apk add --no-cache \ | |
bash \ | |
bc \ | |
g++ \ | |
git \ | |
make \ | |
musl-dev \ |
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 | |
systemctl stop salt-minion | |
rm -f /etc/salt/pki/minion/minion.pem | |
rm -f /etc/salt/pki/minion/minion.pub | |
cp -f /dev/null /etc/salt/minion_id | |
systemctl enable salt-minion | |
systemctl start salt-minion |
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 | |
echo "Hello, today is $(date)" |
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
<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks</H1> | |
<DL><p> | |
<DT><H3 ADD_DATE="1616427741" LAST_MODIFIED="1617895617" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3> | |
<DT><H3 ADD_DATE="1616428159" LAST_MODIFIED="1616428159">CKA special</H3> |
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
#| weight | total score | correct (+ or -) | |
1 6 6 | + | |
2 3 9 | - | |
3 3 12 | | |
4 3 15 | | |
5 6 21 | | |
6 6 27 | | |
7 3 30 | | |
8 3 33 | | |
9 6 39 | |
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 | |
invoke-rc.d salt-minion stop && \ | |
rm -rf /etc/salt/pki/* && \ | |
invoke-rc.d salt-minion start | |
printf "\nminion %s restarted\n" $(cat /etc/salt/minion_id) |
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 role has a trust relationship which allows | |
# to assume the role of ec2 | |
resource "aws_iam_role" "ecs" { | |
name = "${var.appName}_ecs_${var.environ}" | |
assume_role_policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "sts:AssumeRole", |
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
/* | |
To use this synthetic, set the following Secure credentials: | |
NEW_RELIC_INSIGHTS_API_KEY - Your api key from the account settings. | |
NEW_RELIC_ACCOUNT_ID - Your account ID, also found in the account settings. | |
CERTS_TO_MONITOR - A list of hosts to check via https, separated by a comma and a space, for example: | |
host.example.com, foo.example.com | |
Create a new Synthetic monitor, copy the entire contents of this script to the monitor. | |
Set the monitor to run once a day from a single location. |
OlderNewer