Skip to content

Instantly share code, notes, and snippets.

@pandaedward
pandaedward / pfsense
Created February 27, 2022 22:13 — forked from avin/todo.txt
Install FreeBSD packages in pfSense
1. Make sure "enabled" key is set to "yes" in /etc/pkg/FreeBSD.conf
2. Change "enabled: no" to "enabled: yes" in /usr/local/etc/pkg/repos/FreeBSD.conf
3. Change "enabled: no" to "enabled: yes" in /usr/local/etc/pkg/repos/pfSense.conf for FreeBSD repo
4. Now you're able to install packages from FreeBSD official repo
@pandaedward
pandaedward / dnsdist-aarch64
Created December 17, 2021 01:30
Compile dnsdist from source in ARM aarch64 v8 (Ubuntu 20.04)
# Clone the repo and cd to the directory
```
git clone https://github.com/PowerDNS/pdns.git
cd pdns/pdns/dnsdistdist
```
# Ensure all build dependencies, possibly more depending on your env
virtualenv build
@pandaedward
pandaedward / github-qna.md
Last active May 26, 2021 09:21
edward-github-qna

Prompt one

Customer requests and responses:

  1. Shrink large repository: Acme wants GitHub to help them shrink the large repository to a more manageable size that is performant for common Git operations. The large repo is a project that is high visibility with an aggressive roadmap. They request that we help them within the month. It's a large, monolithic repository.

E's response:

First of all go through artifacts in the repository to see if there are any unnecessary files, build packages, build dependencies, images, videos, static fonts or style sheets etc are committed to the repository. Remove these files if appropriate or move static files to be hosted in blob storage like S3 bucket or Azure Storage Account.
@pandaedward
pandaedward / convert-to-spot.ps1
Created April 14, 2021 00:59 — forked from larryclaman/convert-to-spot.ps1
Convert an Azure VM to a Spot VM type
<# Convert a VM to a Spot VM
Based on sample script at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
NOTE: Extensions will not be copied to new instance!!
#>
# Set variables to your specifics
$resourceGroup = "myRG"
$vmName = "myVM"
# Get the details of the VM to be moved to the Availability Set
@pandaedward
pandaedward / buildspec.yml
Last active October 2, 2019 02:35
AWS Codebuild buildspec.yml file
version: 0.2
env:
variables:
APP_NAME: "cicd-art-web"
NS_NAME: "cicd"
parameter-store:
EKS_SECRET_NAME: "/eks/secret-name"
EKS_SECRET_NS: "/eks/secret-namespace"
EKS_SECRET_TOKEN: "/eks/secret-token"
@pandaedward
pandaedward / serverless.yml
Created October 2, 2019 02:16
severless lambda python
service: schedule-stop-py
frameworkVersion: ">=1.2.0"
provider:
name: aws
runtime: python3.7
stage: ${opt:stage, 'develop'}
profile: <YOUR_AWS_PROFILE_NAME>
region: <YOUR_AWS_REGION>
@pandaedward
pandaedward / lambda_function.py
Created October 2, 2019 02:13
lambda python
import boto3
from botocore.exceptions import ClientError
def run(event, context):
client = boto3.client('ec2')
ec2_regions = [region['RegionName'] for region in client.describe_regions()['Regions']]
print("Regions: ", ec2_regions)
for region in ec2_regions:
ec2 = boto3.resource('ec2', region_name=region)