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
# | |
# 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 |
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
## 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
#!/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}") |
WARNING This page contains incomplete and possibly incorrect info. The page is constantly being edited and worked on. Many of these should work but some may be broken. Read the code carefully to understand what you are doing, stuff may be nedd to be changed for your use. Use at your own risk.
Credit for IOCAGE setup goes to https://forums.freenas.org/index.php?resources/fn11-1-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-ombi-transmission-organizr.58/
*** QBRD note: I have chosen different names for my zvol and so. I HAVE TRIED TO USE THE NAMES DESCRIBBED IN "Setup" SECTION! Please be aware of copy/paste errors where my actual zvol name may be used.
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
# 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
# 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
# recipes/default.rb | |
ohai_plugin 'consul' do | |
resource :template | |
variables config_var: node['my_cookbook']['some_important_var'] | |
end |
NewerOlder