Skip to content

Instantly share code, notes, and snippets.

View Hlakaza's full-sized avatar

Lucky Hlakaza Hlakaza

View GitHub Profile
@Hlakaza
Hlakaza / building-angula-spa
Last active May 27, 2023 21:54
Building a Single-Page Application with Angular
Building a Single-Page Application with Angular
Introduction:
This technical document provides a comprehensive guide on building a single-page application (SPA) using the Angular framework. It covers all essential aspects of SPA development, including project setup, component creation, routing implementation, data handling, and backend integration.
Prerequisites: Before diving into Angular development, ensure you have Node.js and npm installed. Basic knowledge of HTML, CSS, JavaScript, and TypeScript is also recommended for a better understanding of the concepts discussed.
Steps:
1. Setting up the Project: Learn how to set up a new Angular project using the Angular CLI and configure project dependencies for a smooth development workflow.
@Hlakaza
Hlakaza / index.php
Created November 3, 2020 21:30 — forked from drizzentic/index.php
Sample USSD Application
<!-- MIT License
Copyright (c) 2016 Derrick Rono
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Hlakaza
Hlakaza / gist:1fa288997fd86d0de4fccd7ec8f971fb
Created August 19, 2020 21:11 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Hlakaza
Hlakaza / table-data
Last active November 26, 2019 09:45
{
"headings":[
"Actions",
"Name",
"Surname",
"ID Number",
"content"
],
"columns":[
{
import { Injectable } from '@angular/core';
import { ReplaySubject } from 'rxjs';
import { BreakpointObserver } from '@angular/cdk/layout';
@Injectable({
providedIn: 'root'
})
export class DeviceInfoService {
deviceInfo = new ReplaySubject();
@Hlakaza
Hlakaza / getDomainName.js
Created July 22, 2018 08:52 — forked from tahirm/getDomainName.js
Get complete domain name with protocol and port if available. #js #url From http://stackoverflow.com/questions/6941533/javascript-get-protocol-domain-and-port-from-url
var domain = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port : '');
@Hlakaza
Hlakaza / gist:ae4ee27d17777e6a5b00f378db4bb47f
Created May 31, 2018 08:19 — forked from WhatIsHeDoing/custom-fonts.scss
Embedding and Using Custom Fonts with SASS
/*
* _mixins.scss
*/
$font_dir: '../fonts/';
/* _simple-font-url('Chunkfive', 'eot'); */
@function _simple-font-url($name, $extension)
{
@return url($font_dir + $name + '-webfont.' + $extension);

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
var staticCacheName = 'sw-v0';
self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(staticCacheName).then(function (cache) {
return cache.addAll([
'manifest-sw.json'
]);
})
);