Skip to content

Instantly share code, notes, and snippets.

View HansUXdev's full-sized avatar

Hans HansUXdev

View GitHub Profile
@HansUXdev
HansUXdev / docker-compose.yml
Created June 11, 2019 23:09
wordpress docker-compose
# Please note that in actual production all passwords, usernames, dbnames, etc MUST grab from .env or the like
# Otherwise you may as well tell the whole world to hack you because WP wasn't already the largest possible target...
version: '3'
services:
# Database
db:
# Give the DB a unique name
container_name: baseDB
@HansUXdev
HansUXdev / readme.md
Last active June 18, 2019 21:10
YETI.js

About YETI

Currently YETI exists mostly as a thought experiment attempting to answer the question of "how could web developers and designers move away from traditional row & column based design?" and "do we need to?"

YETI attempts to answer this question by defining semantic templates using css grid-template and dynamic properties to responsively diff the templates definitions.

P.S. More than likely this is just a dumb, overly complex way to think about layouts... You be the judge.

Goals

@HansUXdev
HansUXdev / resourses.md
Created June 24, 2019 21:27
resources for new web developers

Resources

A curated list of useful resources that includes a combination of free and paid content.

Feel free to submit a pull request if you have any suggestions.

Table of Contents

@HansUXdev
HansUXdev / NavigationBar.js
Created July 2, 2019 07:05
Some scrolly navbar
import React, { Component } from 'react';
import Scrollspy from 'react-scrollspy';
import FancyName from '../components/FancyName';
import {
Nav,
Navbar
} from 'react-bootstrap';
function modifiedGraphEdges(n, edges, source, destination, target) {
const finalize = (m, edges) => {
for (let e of edges) {
if (e[2] < 0) {
if (m > 0) {
--m;
e[2] = 1;
} else {
e[2] = 1234567890;
}
@HansUXdev
HansUXdev / createSprite.py
Created November 28, 2023 20:41
A utility function for training GPT on creating storyboards and prototypes for
from PIL import Image
# File paths of the storyboard images
file_paths = [
'/mnt/data/Storyboard_for_a_responsive_website_homepage_for_a.png',
'/mnt/data/Storyboard_for_a_responsive_About_Us_page_for_a_.png',
'/mnt/data/Storyboard_for_a_responsive_Residential_Informati.png',
'/mnt/data/Storyboard_for_a_responsive_Commercial_Spaces_pa.png',
'/mnt/data/Storyboard_for_a_responsive_Community_Amenities_.png',
'/mnt/data/Storyboard_for_a_responsive_Events_and_News_page.png',
@HansUXdev
HansUXdev / create_directory_structure.py
Created November 28, 2023 21:15
The script reads the YAML file and parses the directory structure. It then recursively creates directories and files as specified in the YAML file. Before Running the Script: Ensure Python is installed on your system. Install the pyyaml package if not already installed (use pip install pyyaml). Update the yaml_file variable with the correct path…
import os
import yaml
def create_directory_structure(root, structure):
if isinstance(structure, list):
for item in structure:
if isinstance(item, dict):
for key, val in item.items():
dir_path = os.path.join(root, key)
os.makedirs(dir_path, exist_ok=True)
@HansUXdev
HansUXdev / gist:b52ddfaa647672b9a4aca39e3737dc30
Last active January 22, 2024 22:25
FinancialForecasting.py
# Import necessary libraries
import numpy as np
import yfinance as yf
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error, mean_absolute_error
from statsmodels.tsa.holtwinters import ExponentialSmoothing
# Data Acquisition