Skip to content

Instantly share code, notes, and snippets.

View anikwai's full-sized avatar
🎯
Focusing

Watson Cyrus Anikwai anikwai

🎯
Focusing
  • Our Telekom
  • Solomon Islands
  • 14:02 (UTC +11:00)
  • X @wanikwai
View GitHub Profile
Sub MergeCSVFiles()
Dim FolderPath As String
Dim FileName As String
Dim WS As Worksheet
Dim WB As Workbook
Dim LastRow As Long
Dim DataRange As Range
Dim TargetRow As Long
' Prompt the user to select a folder
#################################################################################################################
#
# Version 1.4 February 2016
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
# Script to Automated Email Reminders when Users Passwords due to Expire.
#
# Requires: Windows PowerShell Module for Active Directory
#
# For assistance and ideas, visit the TechNet Gallery Q&A Page. http://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27/view/Discussions#content
@anikwai
anikwai / install_powershell_mac.md
Created December 6, 2023 22:43
How to install powershell on mac

How to install Windows Powershell on Macosx

You need brew installed on your Mac inorder to install powershell. Get brew from https://brew.sh or download it from here https://github.com/Homebrew/brew/releases/tag/4.1.24

On Mac copy the script below and paste in your terminal - it is that simple.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@anikwai
anikwai / inheritance_polymorphism.md
Last active December 1, 2023 02:18
inheritance_polymorphism

What is the difference between inheritance and polymorphism in PHP?

1.0 Inheritance

Inheritance in PHP allows a class to inherit properties and methods from another class. Here's a simple example:

<?php

// Base class or Parent class
class Vehicle {
# Import the Active Directory module if not already loaded
if (!(Get-Module -Name ActiveDirectory)) {
Import-Module ActiveDirectory
}
# Get all users where PasswordNeverExpires is set to true and account is enabled
$users = Get-ADUser -Filter { PasswordNeverExpires -eq $true -and Enabled -eq $true } -Properties PasswordNeverExpires
# Export to CSV
$users | Select-Object SamAccountName, PasswordNeverExpires | Export-Csv -Path C:\temp\PasswordNeverExpiresUsers.csv -NoTypeInformation
@anikwai
anikwai / docker_wordpress.md
Created May 4, 2023 02:05 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@anikwai
anikwai / models.py
Created November 8, 2022 04:01 — forked from mushonnip/models.py
Django model to generate unique id/ booking id/ transaction id
import uuid
class Booking(models.Model):
booking_no = models.CharField(primary_key=True, default=uuid.uuid4().hex[:5].upper(), max_length=50, editable=False)
def __str__(self):
return str(self.booking_no)
Guadalcanal
ADO
ADO HAILALUA
ALIGATOR CREEK
AO
AREATAKIKI
BAHOVU
BELAHA
BEMUTA
BIRAO
@anikwai
anikwai / install_ispconfig3_debian.sh
Created November 17, 2019 00:31
Install ISPConfig 3.x on Debian 9 64Bits
#!/bin/bash
## Install ISPConfig 3.x on Debian 9 64Bits
## ISPConfig3 3.x + Apache2 + Debian 9 64Bits
## VM HD 50GB, swap 2GB, / 20GB, /var/www all
## Filesystem ext4
## Run as root
## Link: https://www.howtoforge.com/tutorial/perfect-server-debian-9-stretch-apache-bind-dovecot-ispconfig-3-1
# Check if user has root privileges
@anikwai
anikwai / Key Sublime Text 3.2.1 Build 3207
Created June 3, 2019 15:12
UPDATED Key for Sublime Text 3.2.1 Build 3207 [4 June 2019 ]
Key Sublime Text 3.2.1 Build 3207
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4