Skip to content

Instantly share code, notes, and snippets.

View UdaraJay's full-sized avatar

Udara Jay UdaraJay

View GitHub Profile
@UdaraJay
UdaraJay / explorer.py
Last active April 11, 2025 20:09
Concept explorer
import requests
import json
import time
from collections import deque
import os
import sys
import random
import networkx as nx
from colorama import Fore, Back, Style, init
import shutil
@UdaraJay
UdaraJay / main.rs
Created August 9, 2024 18:27
Insetting traffic light position in tauri apps on macOS
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[cfg(target_os = "macos")]
#[macro_use]
extern crate cocoa;
#[cfg(target_os = "macos")]
#[macro_use]
extern crate objc;
@UdaraJay
UdaraJay / index.jsx
Created November 17, 2023 04:03
Portfolio react page example
import { Link } from "gatsby"
import React, { useEffect, useState } from "react"
import * as styles from "./work.module.scss"
import WORK from "./work.json"
const WorkPage = () => {
const [focused, setFocus] = useState(false)
const toggleFocus = src => {
if (focused === false || focused !== src) {
@UdaraJay
UdaraJay / Apps.jsx
Created October 15, 2023 14:43
Animated card stack
import styles from './Apps.module.scss';
import { useEffect, useState } from 'react';
import Link from 'next/link';
const APPS = [
{
title: 'APP',
hero: 'Lorem ipsum dolor sit amet',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.',
@UdaraJay
UdaraJay / useful.md
Last active August 1, 2018 20:46
Useful things
@UdaraJay
UdaraJay / ClassComponent.jsx
Last active June 18, 2018 13:48
Sample class based react component - ES6 (Best practices)
// Using this as a way to collect my 'best-practices' for React
// The structure of a good class based component
import React, { Component } from 'react'
// MobX is designed to enable building web applications with a complex data model in an intuitive and very performant manner.
import { observer } from 'mobx-react'
// A runtime checker for props
import { string, object } from 'prop-types'
@UdaraJay
UdaraJay / Implementation.md
Last active April 3, 2017 00:58
Global Storefront using WooCommerce with WordPress

WooCommerce on WordPress

A standard WooCommerce implementation, with theme supporting category pages inorder to imitate different storefronts.

Separate departments using categories

You can imitate the different store-fronts using different categories of products and changing the style with custom category templates.

Tutorial for custom templates: https://docs.woocommerce.com/document/template-structure/
More info on product categories: https://docs.woocommerce.com/document/managing-product-taxonomies/

  • Global shop