require "socket"
server = TCPServer.open(2626)
loop do
Thread.fork(server.accept) do |client|
client.puts("Hello, I'm Ruby TCP server", "I'm disconnecting, bye :*")
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
- Debug log output from `PACKER_LOG=1 packer build template.json`. | |
``` | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address 0.0.0.0:443, port 443 unavailable for VNC | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::443, port 443 unavailable for VNC | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address 0.0.0.0:80, port 80 unavailable for VNC | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::80, port 80 unavailable for VNC | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::22, port 22 unavailable for VNC | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address 0.0.0.0:22, port 22 unavailable for VNC | |
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::8000, port 8000 unavailable for VNC |
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
# recipes/default.rb | |
ohai_plugin 'consul' do | |
resource :template | |
variables config_var: node['my_cookbook']['some_important_var'] | |
end |
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 is an example based on: https://www.consul.io/docs/guides/semaphore.html | |
# And https://github.com/hashicorp/consul/issues/1940 | |
# we want to see how our variables resolve to URLs | |
set -x | |
# Set up some variables | |
SERVICE=foobartest | |
PREFIX=service/${SERVICE}/lock | |
LOCK=${PREFIX}/.lock |
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
# frozen_string_literal: true | |
# The MIT License (MIT) | |
# | |
# Copyright:: 2017, QubitRenegade | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
module my-hab 1.0; | |
require { | |
type init_t; | |
type tmp_t; | |
type default_t; | |
type http_port_t; | |
class sock_file { create write }; | |
class process setpgid; | |
class file { create execute execute_no_trans map open read rename setattr unlink write }; |
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 | |
set -u | |
for boot_vga in /sys/bus/pci/devices/*/boot_vga; do | |
echo "Found vga device: ${boot_vga}" | |
if [ $(<"${boot_vga}") -eq 0 ]; then | |
echo "Found Boot VGA Device - false: ${boot_vga}" | |
dir=$(dirname -- "${boot_vga}") |
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
## Server ## | |
# When running as a daemon, the file to store the pid in | |
pid_file: "/var/run/matrix-synapse.pid" | |
public_baseurl: https://matrix.example.com/ | |
allow_public_rooms_without_auth: true | |
allow_public_rooms_over_federation: true | |
#federation_domain_whitelist: | |
# - lon.example.com |
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
class Foo | |
def initialize | |
puts '[*] In Foo#initialize' | |
@foo = ['Added in intialize in Foo'] | |
end | |
def foo | |
puts '[*] In Foo#foo: ' | |
pp @foo | |
puts "[*] foo.class: #{@foo.class}" |
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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 5.2.8 Kernel Configuration | |
# | |
# | |
# Compiler: gcc (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1) | |
# | |
CONFIG_CC_IS_GCC=y | |
CONFIG_GCC_VERSION=90101 |
OlderNewer