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
constraint RegisteredPort for integer { | |
minimum 1024, maximum 49151 | |
} | |
constraint HostPattern for string { | |
format "regex" | |
} | |
type ServiceAddress { | |
hostname: string { |
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
{ | |
"$id": "http://hstefan.com/confer/sample-config-schema", | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"description": "JSON schema for a sample Confer configuration", | |
"type": "object", | |
"required": [ | |
"conferd" | |
], | |
"properties": { | |
"conferd": { |
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:multi_python_server | |
@py3_image_base//image:image | |
@py3_image_base//image:config.json | |
@py3_image_base//image:002.tar.gz | |
@py3_image_base//image:001.tar.gz | |
@py3_image_base//image:000.tar.gz | |
@py3_debug_image_base//image:image | |
@py3_debug_image_base//image:config.json | |
@py3_debug_image_base//image:003.tar.gz | |
@py3_debug_image_base//image:002.tar.gz |
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
Sep 21 14:47:48 windy systemd[1]: Starting Disables C6-state CPU state using zenstates.py... | |
-- Subject: Unit zenstates.service has begun start-up | |
-- Defined-By: systemd | |
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel | |
-- | |
-- Unit zenstates.service has begun starting up. | |
Sep 21 14:47:48 windy zenstates.py[9529]: Disabling C6 state | |
Sep 21 14:47:48 windy zenstates.py[9530]: P0 - Enabled - FID = 80 - DID = 8 - VID = 32 - Ratio = 32.00 - vCore = 1.23750 | |
Sep 21 14:47:48 windy zenstates.py[9530]: P1 - Enabled - FID = 8C - DID = A - VID = 50 - Ratio = 28.00 - vCore = 1.05000 | |
Sep 21 14:47:48 windy zenstates.py[9530]: P2 - Enabled - FID = 7C - DID = 10 - VID = 68 - Ratio = 15.50 - vCore = 0.90000 |
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
static int read_line(void) { | |
/* States for read_line. */ | |
enum read_line_state { NORM = 0, SPACE = 1, QUOTE = 2, BACKSLASH = 3 }; | |
static bool eof = false; | |
/* Start out in mode SPACE to always strip leading spaces (even with -i). */ | |
enum read_line_state state = SPACE; /* The type of character we last read. */ | |
int prevc; /* The previous value of c. */ | |
int quotc = 0; /* The last quote character read. */ | |
int c = EOF; | |
bool first = true; /* true if reading first arg on line. */ |
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
static int read_line(void) { | |
/* States for read_line. */ | |
enum read_line_state { NORM = 0, SPACE = 1, QUOTE = 2, BACKSLASH = 3 }; | |
static bool eof = false; | |
/* Start out in mode SPACE to always strip leading spaces (even with -i). */ | |
enum read_line_state state = SPACE; /* The type of character we last read. */ | |
int prevc; /* The previous value of c. */ | |
int quotc = 0; /* The last quote character read. */ | |
int c = EOF; | |
bool first = true; /* true if reading first arg on line. */ |
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 | |
# use this for "External Tools/External Script Editor" | |
# "External Tools/External Script Editor Args" should be "$(File)" "$(Line)" | |
import sys | |
import os | |
import re | |
project = os.path.basename(os.getcwd()) |
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 | |
#clear current rules | |
iptables -F | |
iptables -P INPUT DROP | |
iptables -P OUTPUT DROP | |
iptables -P FORWARD DROP | |
#allow ssh |
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
int p1::compute() | |
{ | |
//auto mult = [](int n) causes the compiler to not infer the type correctly and not compile | |
auto mult = [](int n) -> std::function<int(int)> | |
{ | |
return [n] (int i) mutable { | |
return i * n; | |
}; | |
}; | |
NewerOlder