This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const EventEmitter = require('events') | |
| class TestEmitter extends EventEmitter { | |
| constructor( opts = {} ) { | |
| super(opts) | |
| this.name = opts.name | |
| this.testFireIncrementer = 0 | |
| } | |
| testFire() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const init = function(type) { | |
| let id = 0; | |
| return (name, props=null) => { | |
| id +=1; | |
| return { | |
| id, | |
| type, | |
| name, | |
| ...props | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| find_me="Process image" | |
| results=() | |
| next_idx=0 | |
| while read -r LineFromFile || [[ -n "${LineFromFile}" ]]; do | |
| if [[ $LineFromFile =~ "$find_me" ]]; then | |
| results[$next_idx]=$LineFromFile | |
| next_idx=$((next_idx+1)) | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bl_info = { | |
| "name": "DemoRack", | |
| "description": "Make Mini Rack Units Dynamically", | |
| "author": "Jim O'Connor <[email protected]>", | |
| "version": (0, 0, 1), | |
| "blender": (2, 90, 1), | |
| "category": "3D View" | |
| } | |
| module_names = [ 'standoff_props', 'standoff_operator', 'standoff_panel' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from "https://cdn.skypack.dev/[email protected]"; | |
| import ReactDOM from "https://cdn.skypack.dev/[email protected]"; | |
| import { v4 } from "https://cdn.skypack.dev/[email protected]"; | |
| // use "generateId()" function to create a unique id | |
| const generateId = v4; | |
| function TodoForm(props) { | |
| const { createTodo } = props; | |
| const [inputValue, setInputValue] = useState(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import bmesh | |
| class Standoff: | |
| def __init__(self, name="Std", m_diam=3, depth=3, segments=64): | |
| self.name = name | |
| self.depth = depth | |
| self.segments = segments | |
| self.radii = self.__radii(m_diam) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| from addon_utils import check, enable | |
| C = bpy.context | |
| D = bpy.data | |
| SCALE_LENGTH = 0.001 | |
| LENGTH_UNIT = 'MILLIMETERS' | |
| MASS_UNIT = 'GRAMS' | |
| CLIP_END = 100000 | |
| PRINT_UTIL = "object_print3d_utils" |