Skip to content

Instantly share code, notes, and snippets.

View gkarugi's full-sized avatar

Karugi Gitau gkarugi

View GitHub Profile
@gkarugi
gkarugi / generating ssl certs with letsencrypt using certbot
Created May 17, 2018 16:56
works on ubuntu (or a linux distro)
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
sudo ./certbot-auto
//wildcard ssl
sudo ./certbot-auto certonly \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual --preferred-challenges dns \
-d *.example.com
https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/
<template>
<div class="uk-offcanvas-content">
<div>{{ websiteName }}</div>
<navigation-bar></navigation-bar>
<main-content-area></main-content-area>
</div>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import Vue from 'vue';
import Vuex from 'vuex';
import axios from 'axios';
Vue.use(Vuex);
const tenantWebsiteStore = new Vuex.Store({
state: {
website: []
},
https://codeburst.io/creating-reusable-components-with-vue-js-button-component-503167facfde
https://vuejsdevelopers.com/2017/09/11/vue-js-vuex-plugins/
https://medium.com/@BjornKrols/tutorial-dynamic-content-via-url-query-parameters-in-vue-js-d2df19b66633
https://laravel-news.com/building-vue-spa-laravel-part-2/
https://laravel-news.com/building-vue-spa-laravel-part-3
@gkarugi
gkarugi / ngrok-self-host-ubuntu-16.04
Last active March 8, 2018 13:40
Self Hosting Ngrok on ubuntu 16
r
hackster.io
@gkarugi
gkarugi / birds.pl
Last active January 16, 2018 14:11
% Run the program by running go.
go :- hypothesize(Bird),
write('I guess that the bird is: '),
write(Bird), nl, undo.
/* hypotheses to be tested */
hypothesize(chicken) :- chicken, !.
hypothesize(eagle) :- eagle, !.
hypothesize(vulture) :- vulture, !.
:- module(birds, [solve/0]).
%
% Start of an implementation of the code at
% http://www.amzi.com/ExpertSystemsInProlog/
%
%
:- dynamic
known/3,
voice/1,
season/1,
@gkarugi
gkarugi / letsencrypt_2017.md
Created June 8, 2017 04:46 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.