Skip to content

Instantly share code, notes, and snippets.

View stuartelimu's full-sized avatar
🎯
Focusing

Stuart Elimu stuartelimu

🎯
Focusing
View GitHub Profile
@stuartelimu
stuartelimu / base.html
Last active March 28, 2020 19:10
Readit Blog
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Readit - Free Bootstrap 4 Template by Colorlib</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
"$matchOne": func(template, context map[string]interface{}) (interface{}, error) {
if err := restrictProperties(template, "$matchOne"); err != nil {
return nil, err
}
match, ok := template["$matchOne"].(map[string]interface{})
if !ok {
return nil, TemplateError{
Message: "$matchOne can evaluate objects only",
Template: template,
@stuartelimu
stuartelimu / db.md
Last active October 3, 2019 12:42
PHP MySQL Revision

connect to the database, CRUD

$con = mysql_connect("localhost","root","");

// select database 
mysql_select_db("database-name");

// perform query 
// insert query
@stuartelimu
stuartelimu / ausers-urls.py
Last active February 22, 2021 18:28
Article
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('accounts.urls')),
]
@stuartelimu
stuartelimu / .htaccess
Created July 6, 2019 11:28
Laravel setup file for infinityfree.net
##################################################
#
# Replace the fields with your app and domain name
#
##################################################
DirectoryIndex <app name>/public/index.php index.html index.htm index2.html
RewriteEngine on