Skip to content

Instantly share code, notes, and snippets.

View kenedyivan's full-sized avatar

kenedy akena kenedyivan

  • Kampala, Uganda
View GitHub Profile
@kenedyivan
kenedyivan / mysqlbackup.bash
Created January 11, 2023 10:07 — forked from shanesova/mysqlbackup.bash
MySql backup script
#!/bin/bash
# Shell script to backup MySql database
# To backup Nysql databases file to /backup dir and later pick up by your
# script. You can skip few databases from backup too.
# For more info please see (Installation info):
# http://www.cyberciti.biz/nixcraft/vivek/blogger/2005/01/mysql-backup-script.html
# Last updated: Aug - 2005
# --------------------------------------------------------------------
# This is a free shell script under GNU GPL version 2.0 or above
# Copyright (C) 2004, 2005 nixCraft project
@kenedyivan
kenedyivan / README-Template.md
Created May 30, 2022 11:33 — forked from DomPizzie/README-Template.md
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@kenedyivan
kenedyivan / numbers.py
Created August 26, 2020 22:25 — forked from dnmellen/numbers.py
Simple template filter for django to convert numbers to cool format (2.3K, 4M, etc..)
from django import template
register = template.Library()
@register.filter
def cool_number(value, num_decimals=2):
"""
Django template filter to convert regular numbers to a
cool format (ie: 2K, 434.4K, 33M...)
@kenedyivan
kenedyivan / node_nginx_ssl.md
Created May 17, 2020 08:35 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@kenedyivan
kenedyivan / README-Template.md
Created January 7, 2020 09:47 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@kenedyivan
kenedyivan / Email Server (Linux, Unix, Mac).md
Created January 23, 2019 13:43 — forked from raelgc/Email Server (Linux, Unix, Mac).md
Setup a Local Only Email Server (Linux, Unix, Mac)

Setup a Local Only Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@kenedyivan
kenedyivan / XmppClient.java
Created December 28, 2017 12:15 — forked from emrekgn/XmppClient.java
Smack API example (uses Smack v4.1.5)
package xmpp.client.example;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Collection;
import org.jivesoftware.smack.AbstractXMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.SmackException.NotConnectedException;