Instantly share code, notes, and snippets.

View main.py
from flask import Flask
app = Flask('app')
#@app.route('/')
#def hello_world():
# return 'Hello, World!'
@app.route('/rob')
View main.sh
print_red() {
RED='\033[0;31m'
NC='\033[0m' # No Color
printf "${RED}${1}${NC}\n"
}
print_orange() {
ORANGE='\033[0;33m'
NC='\033[0m' # No Color
echo -e "${ORANGE}${1}${NC}"
View Jenkinsfile
pipeline {
agent any
triggers {
pollSCM('H * * * *')
}
stages {
stage('Work') {
steps {
View start.ino
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output
pinMode(0, OUTPUT); //LED on Model B
pinMode(1, OUTPUT); //LED on Model A
}
// the lop routine runs over and over again forever:
void loop() {
digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
View bash_colors_echo.md

Coloring Echo in Bash

You can use these ANSI escape codes:

Black        0;30     Dark Gray     1;30
Red          0;31     Light Red     1;31
Green        0;32     Light Green   1;32
Brown/Orange 0;33     Yellow        1;33
Blue         0;34     Light Blue    1;34
View conjur_leastpriv_seccomp.json
{
"description": "Default Docker seccomp profile, plus keyctl calls (required by Conjur)",
"comment": "Run with `docker run --security seccomp:path/to/conjur_leastpriv_seccomp.json` to use it.",
"defaultAction": "SCMP_ACT_ERRNO",
"architectures": [
"SCMP_ARCH_X86_64",
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
],
"syscalls": [
View Tkinder_reference.py
from Tkinter import *
def clickme_clicked():
response = "Welcome to " + txt.get()
lbl.configure(text = response)
print(rad_selected.get())
messagebox.showinfo('Script Status','Completed!')
# Start the window
window = Tk()
View Conjur_CFT_5_1_2.template
---
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
ConjurVersion:
Description: Select the version of Conjur to launch.
Type: String
Default: 5.1.2
AllowedValues:
- 5.1.2
View cdemo_CFT_5_1_1.template
---
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
Subnet:
Description: Subnet to launch cdemo instance in.
Type: AWS::EC2::Subnet::Id
VpcId:
View static_ip_ubuntu1804.md

Configuring Static IP Addresses With Networkd

To configure a static IP address using the new NetPlan tool, the file should look like this: IPv4 address (192.168.1.2), Gateway (192.168.1.1), DNS Servers (8.8.8.8,8.8.4.4)

Run the commands below to create a new network configuration file

sudo nano /etc/netplan/01-netcfg.yaml

Then configure IPv4 addresses as shown below… take notes of the format the lines are written…