Skip to content

Instantly share code, notes, and snippets.

@bessfernandez
bessfernandez / setting-up-html-storybook-app.md
Last active March 28, 2023 16:37
How to setup a simple Storybook HTML demo app

icon-storybook-default

Storybook for HTML

Storybook is all about writing stories. A story usually contains a single state of one component, almost like a visual test case.

Typically you see Storybook used for React or other frameworks, but the library has recently introduced the option to use HTML for your Storybook projects. As a prototyping tool or playground this is great! No larger scale knowledge of other frameworks needed.

Install Storybook HTML

@shankarshastri
shankarshastri / LearnXInYMinProtocolBuffer.proto
Last active February 2, 2024 03:18
Self-Explanatory Protocol Buffer Lang Guide (CheatSheet)
/*
* Self-Explanatory Protocol Buffer Lang Guide
*/
/*
* Why Protocol Buffers?
* Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
* You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.
* Protocol Buffers are Schema Of Messages. They are language agnostic.
@hidehiro98
hidehiro98 / KyberExample.sol
Created September 2, 2018 06:06
Contract example of the KyberNetwork after small modification
// KyberExample.sol 修正後
// https://developer.kyber.network/docs/DappsGuide#contract-example
pragma solidity 0.4.18;
import "./ERC20Interface.sol";
import "./KyberNetworkProxy.sol";
@amboutwe
amboutwe / yoast_seo_breadcrumb_remove_link.php
Last active April 12, 2024 06:43
These snippets are examples of how you can modify the Yoast SEO breadcrumb visual output. These snippets will not alter the breadcrumb schema output. Please consult the schema documentation to change the breadcrumb schema: https://developer.yoast.com/features/schema/api#to-add-or-remove-graph-pieces
@fuglede
fuglede / tensorflow101.ipynb
Last active August 30, 2023 06:45
TensorFlow 101
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darinwilson
darinwilson / sonic_pi_examples.txt
Last active March 15, 2024 14:59
Sonic Pi Examples
##############################################
## Example 1 - play a note
play 60
##############################################
## Example 2 - play 4 random notes
4.times do
play rrand_i(60, 90)
sleep 0.5
@karpathy
karpathy / min-char-rnn.py
Last active May 4, 2024 17:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});