Skip to content

Instantly share code, notes, and snippets.

View devsecfranklin's full-sized avatar
🎯
time to make the donuts

Franklin D. devsecfranklin

🎯
time to make the donuts
View GitHub Profile
#!/bin/bash
# Date: 01/20/2023
# devsecfranklin@duck.com
#set -eu
#Black 0;30 Dark Gray 1;30
#Red 0;31 Light Red 1;31
#Green 0;32 Light Green 1;32

lolcat

fish/py3

# Define alias in shell
alias cat "/usr/games/lolcat"

# Define alias in config file
alias cat="/usr/games/lolcat"
@devsecfranklin
devsecfranklin / test_kb_changes.md
Last active October 25, 2021 13:25
test_kb_changes.md

Testing

  • Clone (or fork, then clone) the repo:
git@github.com:PaloAltoNetworks/pan-os-python.git
cd pan-os-python
  • See what branch you are on/change to dev branch:

Demo Outline

In this quick demo we will take a look at a "Cloud Native" and security-focused lab in GCP.

You can click here to see the reference diagram for the demo.

A Bit About "On Boarding"

  • cloudbot-call.yml file is added to repo as a GH action
  • GCP creds are added to the Settings for the repo.

sudo install -d -m755 -o $(id -u) -g $(id -g) /nix curl -L https://nixos.org/nix/install | sh

Then don't forget to run the command provided at the end of the installation script to make nix available in your system:

  • BASH users (you probably want this)
source $HOME/.nix-profile/etc/profile.d/nix.sh
@devsecfranklin
devsecfranklin / raspi_cross_compile.md
Last active February 24, 2018 22:07
compile for raspberry pi with tool chain

sudo apt-get install git rsync cmake lib32z1 lib32ncurses5

git clone git://github.com/raspberrypi/tools.git sudo mv tools /opt/raspi-toolchain

  • add line to .bashrc export PATH=$PATH:/opt/raspi-toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
arm-linux-gnueabihf-gcc -v

How to add pictures to the raspi

Manually

  • Open terminal window
  • scp picture-name.jpg pi@192.168.1.33:/media/pi/Lexar/pictures
    • You can copy in a single picture or a whole folder

With SFTP CLient

Navigate to:

code/environments/production/modules/role/manifests

Create a new role manifest

Just copy the old one because we're lazy. We can always add/remove profile manifests from the role later if needed.

* Create a new file in iac_workshop/puppetlabs/code/environments/production/modules/profile/templates
* Let's call it issue.erb
```
<%# Non-printing tag ↓ -%>
<% if @keys_enable -%>
<%# Expression-printing tag ↓ -%>
keys <%= @keys_file %>
<% unless @keys_trusted.empty? -%>

Edit file common.yaml

iac_workshop/puppetlabs/code/environments/production/data/common.yaml needs two new lines.

dnsserver    :  ‘8.8.4.4’
searchdomain : ‘amazonaws.com’

Create new Puppet Manifest