Skip to content

Instantly share code, notes, and snippets.

View danqulogy's full-sized avatar

Ben White danqulogy

View GitHub Profile
#!/bin/bash
set -euo pipefail
# Directory setup
APP_DIR="${HOME}/Applications"
ICON_DIR="${HOME}/.local/share/icons"
DESKTOP_DIR="${HOME}/.local/share/applications"
BIN_DIR="${HOME}/.local/bin"
@danqulogy
danqulogy / simple_html_visualization.html
Created July 7, 2023 09:33
Simple Loading Visualization
<!DOCTYPE html>
<html data-theme="cupcake" lang="en">
<head>
<meta charset="utf-8" />
<title>BusPro</title>
<base href="/" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
</head>
<body>
@danqulogy
danqulogy / index.html
Created February 1, 2023 10:07
Schema.org markup for SEO
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"name": "Example Company",
"image": "https://www.example.com/logo.png",
"url": "https://www.example.com/",
"telephone": "+1-123-456-7890",
"address": {
"@type": "PostalAddress",
@danqulogy
danqulogy / sitemap.xml
Created February 1, 2023 09:55
Sitemap Example
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2023-01-29</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/services/study-abroad-consultancy</loc>
@danqulogy
danqulogy / habits_of_highly_effective_programmers1.txt
Last active June 8, 2022 11:07
Habits of highly productive programers
Quick overview -
1. Exercise
2. Good Sleep
3. Drink a lot of fluid to save your eyes
4. Have exposure to sunlight during your non-productive hours such mealtime
5. Keep back straight while sitting on chair
6. Fix a goal and then reverse engineer the timelines and technical effort
7. Have result-oriented goals (products which u can really ship)
8. Keep it simple. (Write a simple code which is easy to read and debug which helps in shipping product faster)
9. Don’t get disturbed during your highest concentration period of day by setting expectations with people around us
@danqulogy
danqulogy / docker-compose.yml
Created January 1, 2022 04:19 — forked from rubanraj54/docker-compose.yml
Simple MongoDB cluster using docker compose (3 node cluster)
version: '3'
services:
node1:
image: mongo
ports:
- 30001:27071
volumes:
- $HOME/mongoclusterdata/node1:/data/db
networks:
@danqulogy
danqulogy / dynamic_textfields.dart
Created October 20, 2020 17:26
Add & Remove TextFormFields dynamically in Flutter
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@danqulogy
danqulogy / letsencrypt_2020.md
Created August 25, 2020 17:23 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

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


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@danqulogy
danqulogy / nginx.conf
Created April 1, 2020 14:54 — forked from ulyssesr/nginx.conf
Nginx RTMP Setup
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
@danqulogy
danqulogy / activities.component.html
Created March 13, 2020 15:26
Implementation with ngrx data and nz-zorro pagination component
<div>
<div class="row">
<div class="col-xl-12 col-lg-12">
<ul>
<li *ngFor="let activity of activities$">...</li>
</ul>
<nz-pagination [nzPageIndex]="nextPage" [nzPageSize]="limit"