Skip to content

Instantly share code, notes, and snippets.

Tired of recreating conditional formatting for every sheet in your MS Excel spreadsheet? This macro will apply your formattings to the active sheet. Saves a lot of time.

  • Create a macro
  • Edit it
  • Paste the code below
  • Click on Run while the sheet is visible OR select the sheet, and then swith to "View", "macro" and then run it
Sub AddConditionalFormatting()
@nsoui
nsoui / AWS_Solutions_Architect_Associate_Cert.md
Last active August 7, 2018 04:01
My notes while preparing for an AWS Associate Architect certification

Components

Compute

  • EC2
  • EC2 Container Service
  • Elastic Bean: very DevOps oriented, code/app provisioning without having to deal with the underlaying infrastructure and any AWS specific configs
  • Lambda: serverless
  • Lightsail: VPS service, for bare Win/Lx servers with no AWS specific middleware
  • Batch: useful for batch computing in the cloud

Storage

  • S3: simple storage service: buckets of files

Networking

auto eth0
iface eth0 inet dhcp
metric 100
hostname $(hostname)

auto eth1
iface eth1 inet static
 address 192.168.9.4/24

IPTables setup for a Linux-based Router

The following script will set the router's firewall to reject every thing coming from the WAN, while forwarding all the traffic from LAN to WAN.

#!/bin/sh

PATH=/usr/sbin:/sbin:/bin:/usr/bin

WAN=enp2s0
@nsoui
nsoui / samba.md
Created November 25, 2017 14:17
SAMBA Configuration to share folders in RW anonymously

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP
@nsoui
nsoui / qubes-firewall.md
Last active November 21, 2017 19:17
Basic operations on Qubes Firewall config

Modify the System Firewall to log more

[user@sys-firewall ~]$ sudo iptables -L -n -v --line
Chain INPUT (policy DROP 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1        0     0 DROP       udp  --  vif+   *       0.0.0.0/0            0.0.0.0/0            udp dpt:68
2        0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
3        0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
4        0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
5      340 65960 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited
@nsoui
nsoui / perfect-qubes.md
Last active November 21, 2017 18:56
What to do after installing Qubes

Enable RPM-Fusion

sudo dnf config-manager --set-enabled rpmfusion-free rpmfusion-nonfree
sudo dnf upgrade --refresh

Install google-chrome

chromium, the open source version of google-chrome is available to install out of the box

@nsoui
nsoui / opnsense-xen.md
Last active December 29, 2023 07:00
Run OPNSense under XEN

Network Topology

I really like the Qubes philosophy, routing all the traffic through the SysNET domU. For this reason, I chose to install OPNsense as my network domain and route the whole traffic, including that of Dom0, through it. For this, I made the following Open-VSwitch setup.

OpenVSwitch

Install openvswitch, if not already installed

sudo apt-get install openvswitch

Create the two bridges:

Download

mkdir -p /mnt/xen/images/ubuntu
cd /mnt/xen/images/ubuntu
URL=http://archive.ubuntu.com/ubuntu/dists/artful/main/installer-amd64/current/images/netboot/xen
for fff in {initrd.gz,vmlinuz,xm-debian.cfg}; do wget $URL/$fff ;done

XL Config

-- to follow