Skip to content

Instantly share code, notes, and snippets.

View lucidbard's full-sized avatar

John T. Murray lucidbard

View GitHub Profile
@lucidbard
lucidbard / codeswing.json
Last active February 27, 2023 21:39
InfiniteRunnerP5js
{
"scripts": [
"https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.6.0/p5.js"
],
"styles": [],
"showConsole": true
}
@lucidbard
lucidbard / App.jsx
Last active June 26, 2022 22:45
Chloe
import { useState, useCallback } from 'react'
function Timer({ name, minutes }) {
const [startTime, setStartTime] = useState(undefined)
const [intervalId, setIntervalId] = useState(undefined)
const [value, setValue] = useState(0)
let callback = useCallback(() => {
setInterval(() => {
setValue(value=> value+1)
}, 10)
@lucidbard
lucidbard / App.jsx
Last active March 9, 2021 20:52
RatingWidget
let styles = {
ratingStyle: {
paddingTop: "2px",
paddingBottom: "2px",
textAlign: "center",
cursor: "pointer",
},
ratingTier: {
padding: "7px 10px",
borderLeft: "1px solid #C7CDD1",
@lucidbard
lucidbard / App.jsx
Last active March 4, 2021 01:38
RN Import
import { StyleSheet, Text, View } from "react-native";
import TestComponent from './Test'
export default function App() {
return (
<View>
<Text style={styles.text}>Hello world 🎉</Text>
</View>
);
}
<!DOCTYPE html>
<html>
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@lucidbard
lucidbard / README.md
Created March 18, 2016 00:05 — forked from rkirsling/LICENSE
Directed Graph Editor

Click in the open space to add a node, drag from one node to another to add an edge.
Ctrl-drag a node to move the graph layout.
Click a node or an edge to select it.

When a node is selected: R toggles reflexivity, Delete removes the node.
When an edge is selected: L(eft), R(ight), B(oth) change direction, Delete removes the edge.

To see this example as part of a larger project, check out Modal Logic Playground!

// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@lucidbard
lucidbard / Console.cs
Last active August 29, 2015 14:06 — forked from mminer/Console.cs
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A console to display Unity's debug logs in-game.
/// </summary>
public class Console : MonoBehaviour
{
struct Log
{