Skip to content

Instantly share code, notes, and snippets.

@kongondo
kongondo / install-google-fonts.sh
Created Mar 8, 2021 — forked from keeferrourke/install-google-fonts.sh
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
View install-google-fonts.sh
#!/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"
View bash-install_google_fonts_on_ubuntu.md

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 Jan 22, 2021 — forked from zachjharris/TipTapComponent.vue
Resizable images using TipTap Editor
View TipTapComponent.vue
<template>
<div class="tiptap-content">
<editor-content :editor="editor" />
</div>
</template>
<script>
import {
Editor,
EditorContent
@kongondo
kongondo / commit-message-convention.md
Created Nov 13, 2020 — forked from julienbourdeau/commit-message-convention.md
The seven rules of a great git commit message
View commit-message-convention.md

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
View letsencrypt-webroot-apache.md

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>
@kongondo
kongondo / .gitignore
Created Oct 18, 2020 — forked from hieblmedia/.gitignore
Gitignore - Exclude all except specific subdirectory
View .gitignore
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
View validate-hex-color.js
/**
* Validates hex value
* @param {String} color hex color value
* @return {Boolean}
*/
function isValidHex(color) {
if(!color || typeof color !== 'string') return false;
// Validate hex values
if(color.substring(0, 1) === '#') color = color.substring(1);
View CKEditor.vue
<!-- Based on https://github.com/dangvanthanh/vue-ckeditor -->
<template>
<div class="ckeditor">
<textarea :id="id" :value="value"></textarea>
</div>
</template>
<style scoped>
.ckeditor {
@kongondo
kongondo / currency_list
Created Jan 13, 2020 — forked from champsupertramp/currency_list
World Currency list in PHP Array
View currency_list
array (
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi taka',
@kongondo
kongondo / parsce-csv-test.js
Created Nov 15, 2019 — forked from atomkirk/parsce-csv-test.js
parse csv with javascript
View parsce-csv-test.js
import parseCsv from 'zipbooks/utils/parse-csv'
import { module, test } from 'qunit'
module('Unit | Utility | parse-csv', function(_hooks) {
test('parses csv successfully', function(assert) {
let result = parseCsv('name,age\nadam,31\ntim,32\n"St, clair",26')
assert.equal(JSON.stringify(result), '[["name","age"],["adam","31"],["tim","32"],["St, clair","26"]]')
})