Skip to content

Instantly share code, notes, and snippets.

import React, { useState } from 'react';
const DynamicSVGComponent = () => {
const [shape, setShape] = useState(0);
const [size, setSize] = useState(0);
const [color, setColor] = useState(0);
const changeShape = () => {
setShape((prevShape) => (prevShape + 1) % 3);
};
import matplotlib.pyplot as plt
import networkx as nx
# Define state nodes with positions
nodes = {
"fetch.idle": (116, -164),
"fetch.loading": (102, -345),
"fetch.success": (60, -602),
"fetch.failure": (295, -602),
"fetch.error": (282, -784)
PRAGMA foreign_keys = ON;
-- 1) Nodes (Points)
CREATE TABLE nod (
id INTEGER PRIMARY KEY,
lat REAL NOT NULL,
lon REAL NOT NULL
);
-- 2) Ways
- var values = { key1: "test1", key2: "test2" };
table
thead
tr
th Key
th Value
tbody
each val, key in values
tr
@rxctionzz
rxctionzz / index.html
Created February 4, 2025 16:18
SVG Polygon Generator
<main class="pa4 dark-gray mw7 center sans-serif min-vh-100 flex flex-column flex-row-ns items-center">
<form class="measure-wide mr4-ns mb4 mb0-ns f5">
<fieldset class="ba b--transparent pa0 mh0">
<legend class="f5 b ph0 mh0 ttu tracked bb bw2 pv2 db w-100">
Polygon Generator
</legend>
<div class="mt5 mb4">
<label class="f5 ttu tracked db b mb2" for="js-side-count">
@rxctionzz
rxctionzz / custom-webgl-layer-view.markdown
Created November 25, 2024 19:38
Custom WebGL layer view
@rxctionzz
rxctionzz / index.html
Created July 27, 2024 17:55
social buttons and icons
<link href='https://fonts.googleapis.com/css?family=Pompiere' rel='stylesheet' type='text/css'>
<a href="https://facebook.com/stanwilliamsmusic" target="_blank" class="zocial facebook"> Like on Facebook &nbsp; &nbsp;</a>
<a href="#" class="zocial googleplus"> Google+ &nbsp;</a>
<a href="#" class="zocial twitter"> Twitter &nbsp;</a>
<a href="#" class="zocial linkedin"> LinkedIn &nbsp;</a>
<a href="#" class="zocial paypal">Pay with Paypal &nbsp;</a>
<a href="#" class="zocial amazon"> Amazon &nbsp;</a>
<a href="#" class="zocial skype">Call me on Skype &nbsp;</a>
<a href="#" class="zocial lastfm"> Last.fm &nbsp;</a>
<a href="#" class="zocial yelp">Write a review on Yelp &nbsp;</a>
@rxctionzz
rxctionzz / css-social-buttons-and-icons.markdown
Created June 23, 2024 22:34
CSS social buttons and icons
@rxctionzz
rxctionzz / index.html
Created June 18, 2024 20:53
myDatePicker
<div id="myDatepicker" class="datepicker">
<div class="date">
<label for="id-textbox-1">Date</label>
<div class="group">
<input type="text" placeholder="mm/dd/yyyy" id="id-textbox-1" aria-describedby="id-description-1">
<span class="desc" id="id-description-1">(<span class="sr-only">date format: </span>mm/dd/yyyy)</span>
<button type="button" class="icon" aria-label="Choose Date">
<span class="fa fa-calendar-alt fa-2x"></span>
</button>
JSON.parse(
JSON.stringify(
document.cookie
.split(";")
.map(function (x) {
return x.trim().split(/(=)/);
})
.reduce(function (a, b) {
a[b[0]] = a[b[0]]
? a[b[0]] + ", " + b.slice(2).join("")