Skip to content

Instantly share code, notes, and snippets.

View RealRichi3's full-sized avatar

Richie RealRichi3

View GitHub Profile
import (
"fmt"
"unicode"
)
func isPalindrome(s string) bool {
cleanStr := ""
for _, r := range s {
if unicode.IsLetter(r) || unicode.IsNumber(r) {
import "fmt"
func containsDuplicate(nums []int) bool {
record := make(map[int]bool)
for i := 1; i <= len(nums); i++ {
num := nums[i - 1]
if record[num] {
return true
import axios, { AxiosInstance } from 'axios';
import {
KWIK_CLIENT_DOMAIN_NAME,
KWIK_CUSTOM_FIELD_TEMPLATE,
KWIK_EMAIL,
KWIK_PASSWORD,
KWIK_TEAM_ID,
NODE_ENV,
} from '../config';
import { IAddressDoc, Location } from '../models/types/address.types';
@RealRichi3
RealRichi3 / mailer.js
Created October 12, 2022 19:29
Setup Gmail SMTP with Nodemailer
require('dotenv').config();
const nodemailer = require("nodemailer"),
config = process.env
const transporter = nodemailer.createTransport({
host: "smtp.gmail.com",
port: 465,
secure: true,
auth: {
@RealRichi3
RealRichi3 / timezones-styling.css
Last active April 30, 2022 14:25
CSS styling for timezones project
* {
box-sizing: border-box;
}
body{
height: 100vh;
background-color: #212529;
/* display: flex; */
font-size: 14px;
background: url(./img/background-gd8bdb1f77_1920.jpg);
@RealRichi3
RealRichi3 / timezone.html
Last active April 30, 2022 14:26
html file for timezone project
<!DOCTYPE html>
<html lang="eu">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Time Zones</title>
<link rel='stylesheet' href="page-styling.css">
<!-- <script src="https://cdn.jsdelivr.net/gh/manuelmhtr/countries-and-timezones@latest/dist/index.min.js" type="text/javascript"></script> -->
@RealRichi3
RealRichi3 / timezone.js
Created April 30, 2022 14:18
JS code to check for time in all timezones
const ct = require('countries-and-timezones/');
let allTimeZones = ct.getAllTimezones();
let timeZoneNames = Object.entries(allTimeZones).sort();
const dropdown = document.getElementById('city-list');
// Create Option element with all the timeZones -- In dropdown menu
for (let i = 0; i < timeZoneNames.length; i++) {
window.city = document.createElement('option')
/* Container with other elements within */
.movie {
position: relative;
}
.movie-preview-img {
height: 100%;
width: 100%;
position: relative;
border-radius: 15px;
@RealRichi3
RealRichi3 / page-styling.css
Created April 4, 2022 22:47
Page styling for Movie streaming webpage
* {
box-sizing: border-box;
font-family: sans-serif;
}
body, html{
height: 100vh;
background: #27292D;
}