Skip to content

Instantly share code, notes, and snippets.

View peterkitonga's full-sized avatar

Peter Kitonga peterkitonga

View GitHub Profile
@msandrini
msandrini / focusChangeNotify.ts
Created May 14, 2021 09:20
Vue 3 directive with Typescript - focusChangeNotify
import { DirectiveBinding, ObjectDirective } from 'vue'
type FocusableElement = HTMLInputElement | HTMLTextAreaElement
type NotificationCallback = (isNowFocused: boolean) => void
type GenericEventHandler = () => void
interface ExtendedDirective extends ObjectDirective {
handleFocus: GenericEventHandler
handleBlur: GenericEventHandler
}
@ricardo-dlc
ricardo-dlc / README.md
Last active March 19, 2025 22:46
Update Jenkins Inside a Docker Container

First identify your image.

$ docker ps --format "{{.ID}}: {{.Image}} {{.Names}}"
3d2fb2ab2ca5: jenkins-docker jenkins-docker_1

Then login into the image as root.

$ docker container exec -u 0 -it jenkins-docker_1 /bin/bash
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 27, 2025 09:32
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@silver-xu
silver-xu / ts-boilerplate.md
Last active March 2, 2025 19:56
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@monkishtypist
monkishtypist / hosts
Last active January 5, 2025 13:23
Nginx virtual host example for Windows Subsystem for Linux (WSL)
# Location: /mnt/c/windows/system32/drivers/etc/hosts
127.0.0.1 virtualhost.local www.virtualhost.local
@amitbend
amitbend / nodemailer with Zoho
Last active October 17, 2022 12:32
nodemailer with Zoho
const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
host: 'smtp.zoho.com',
port: 465,
secure: true, //ssl
auth: {
user: '[email protected]',
pass: 'yourpassword'
}
});
@meetkabeershah
meetkabeershah / default nginx configuration file
Last active January 11, 2025 12:19
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#