Skip to content

Instantly share code, notes, and snippets.

@kongondo
kongondo / windows_font_installer.py
Created March 3, 2024 22:34 — forked from lpsandaruwan/windows_font_installer.py
Install a font file in Windows - Python3
""" Python 3 Windows font installer
Script must be run with the privileges in order to access Windows fonts directory. System reboot is not necessary.
This will install the font and will inform programs that a new font has been added.
Python3 Windows font installer is a free python script: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@kongondo
kongondo / index.php
Created February 15, 2024 10:26 — forked from vielhuber/index.php
get next letter in alphabet #php
<?php
$letter = 'A';
echo ++$letter; // outputs 'B'
echo chr(ord($letter) + 3); // outputs 'E'
?>
@kongondo
kongondo / preventAdditionalMouseEvent.html
Created April 15, 2023 12:02 — forked from toruta39/preventAdditionalMouseEvent.html
Prevent mouseout/mouseover event triggered when moving onto/from a child element
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Prevent additional mouse event</title>
</head>
<body>
<div id="ele" style="width: 300px; height: 300px; background-color: #0FF;">
This is the parent element.
<div style="width: 200px; height: 200px; background-color: #FFF;">
@kongondo
kongondo / salesTax.md
Created September 27, 2021 05:08 — forked from lakshmantgld/salesTax.md
Free Sales Tax API based on Postal code by Avalara

Sales Tax API

There are many companies providing sales tax API. Out of all the companies, Avalara offers free API service for sales Tax. This gist is all about setting up avalara API and querying it.

The Free-To-Use API by avalara has some restrictions. Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP response code 429 - Too Many Requests. The requirement for this API is to create an avalara free trail account. You can create a free account using this link create free account.

Once you have filled the form from above link, you will get an e-mail containing temporary credentials to login the avalara account. The e-mail will look something like this:

Avalara e-mail

@kongondo
kongondo / salesTax.md
Created September 27, 2021 05:08 — forked from lakshmantgld/salesTax.md
Free Sales Tax API based on Postal code by Avalara

Sales Tax API

There are many companies providing sales tax API. Out of all the companies, Avalara offers free API service for sales Tax. This gist is all about setting up avalara API and querying it.

The Free-To-Use API by avalara has some restrictions. Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP response code 429 - Too Many Requests. The requirement for this API is to create an avalara free trail account. You can create a free account using this link create free account.

Once you have filled the form from above link, you will get an e-mail containing temporary credentials to login the avalara account. The e-mail will look something like this:

Avalara e-mail

@kongondo
kongondo / install-google-fonts.sh
Created March 8, 2021 05:52 — forked from keeferrourke/install-google-fonts.sh
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
#!/bin/sh
# Written by: Keefer Rourke <https://krourke.org>
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git>
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git
srcdir="/tmp/google-fonts"
pkgdir="/usr/share/fonts/truetype/google-fonts"
giturl="git://github.com/google/fonts.git"

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@kongondo
kongondo / TipTapComponent.vue
Created January 22, 2021 13:31 — forked from zachjharris/TipTapComponent.vue
Resizable images using TipTap Editor
<template>
<div class="tiptap-content">
<editor-content :editor="editor" />
</div>
</template>
<script>
import {
Editor,
EditorContent
@kongondo
kongondo / commit-message-convention.md
Created November 13, 2020 05:26 — forked from julienbourdeau/commit-message-convention.md
The seven rules of a great git commit message

Source: http://chris.beams.io/posts/git-commit/#seven-rules

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how
@kongondo
kongondo / letsencrypt-webroot-apache.md
Created November 9, 2020 07:58 — forked from daronco/letsencrypt-webroot-apache.md
Letsencrypt with webroot on Apache

Config Apache with /etc/apache2/conf-available/le.conf:

Alias /.well-known/acme-challenge/ "/var/www/html/.well-known/acme-challenge/"
<Directory "/var/www/html/">
    AllowOverride None
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    Require method GET POST OPTIONS
</Directory>