Skip to content

Instantly share code, notes, and snippets.

View webeli's full-sized avatar
🎯
Focusing

web3li webeli

🎯
Focusing
View GitHub Profile
@webeli
webeli / jfloss1.marketcap.cash.js
Created September 12, 2021 18:13 — forked from jfloss1/jfloss1.marketcap.cash.js
Tampermonkey Script for MarketCap.Cash
// ==UserScript==
// @name MarketCap.Cash Unofficial Features
// @namespace https://github.com/jfloss1
// @version 1
// @description Add wallet connection support + token balance and totals
// @author John Floss
// @match https://www.marketcap.cash/
// @icon https://www.google.com/s2/favicons?domain=marketcap.cash
// @require https://cdn.ethers.io/lib/ethers-5.2.umd.min.js
// @grant none
@webeli
webeli / package.json
Created March 15, 2018 12:09 — forked from SigurdMW/package.json
Webpack config for Epi Server. Handles .scss, .css, .js, font-files, images (in .js/.scss/.css). Autoprefix and minifying is included
{
"name": "skuld-frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "backstop test",
"approve-tests": "backstop approve",
"build": "set NODE_ENV=production && webpack -p",
"watch": "webpack --cache=false --watch"
@webeli
webeli / on-jsx.markdown
Created March 12, 2018 14:06 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@webeli
webeli / jazecminer.js
Created September 20, 2017 13:00
javascript zcash miner core
it's a core of miner, compiled to find solutions of all-zero block with nonces from 0 to 9,
so 10 total hashes calculated that produce total 20 valid solutions.
target was set to constant all-zero too, so the -O3 even drops comparison with target
(see 'solutions' function).
it's without debug info, so it just prints 10 times "job", steps from 1 to 9 in each job,
and total 20 times "above" (means solution found but above the target).
To run in browser use html file like
@webeli
webeli / throttle.js
Created June 7, 2017 20:35 — forked from beaucharman/throttle.js
An ES6 implementation of the throttle function. "Throttling enforces a maximum number of times a function can be called over time. As in 'execute this function at most once every 100 milliseconds.'" - CSS-Tricks (https://css-tricks.com/the-difference-between-throttling-and-debouncing/)
function throttle(callback, wait, context = this) {
let timeout = null
let callbackArgs = null
const later = () => {
callback.apply(context, callbackArgs)
timeout = null
}
return function() {
@webeli
webeli / index.html
Created February 9, 2016 08:22 — forked from anonymous/index.html
React Example rlgame2 new: add, display, remove items // source http://jsbin.com/mihumom
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="rlgame2 new: add, display, remove items">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdn.firebase.com/js/client/2.4.0/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/reactfire/0.5.1/reactfire.min.js"></script>
<script src="http://fb.me/react-with-addons-0.14.3.js"></script>
<script src="http://fb.me/react-dom-0.14.3.js"></script>
@webeli
webeli / index.html
Created February 9, 2016 08:21 — forked from anonymous/index.html
React Example Logbook of Exercices // source http://jsbin.com/mehive
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Logbook of Exercices">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdn.firebase.com/js/client/2.4.0/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/reactfire/0.5.1/reactfire.min.js"></script>
<script src="http://fb.me/react-with-addons-0.14.3.js"></script>
<script src="http://fb.me/react-dom-0.14.3.js"></script>
@webeli
webeli / index.html
Created February 2, 2016 16:32 — forked from anonymous/index.html
React Example React Firebase Add and Display Items // source http://jsbin.com/gajugi
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="React Firebase Add and Display Items">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdn.firebase.com/js/client/2.4.0/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/reactfire/0.5.1/reactfire.min.js"></script>
<script src="http://fb.me/react-with-addons-0.14.3.js"></script>
<script src="http://fb.me/react-dom-0.14.3.js"></script>