Skip to content

Instantly share code, notes, and snippets.

View bebraw's full-sized avatar

Juho Vepsäläinen bebraw

View GitHub Profile
@cdoremus
cdoremus / fast-check.test.ts
Last active September 28, 2024 09:03
How to use the fast-check property-based testing library with Deno
/**
* Running the fast-check property-based testing library in the Deno
* JavaScript/TYpeScript runtime.
* See: https://github.com/dubzzz/fast-check
*
* This file contains all the 'simple' examples from the fast-check
* repo using Deno.test for the test functions and assertions
* from the Deno standard library. I also added some missing type
* annotations.
*

Fastpack - pack JavaScript fast & easy

This gist is a submission for a lightning talk on the ReactiveConf 2018.

Why?

  • JavaScript bundling can be a lot faster
  • There are proper tools to guarantee consistency
  • Writing OCaml code is fun!
@tlakomy
tlakomy / jQuery>React.markdown
Last active August 17, 2022 12:08
Let's not forget about jQuery

In this talk I'd like to use 5 minutes of my time to explain to the audience why jQuery is simply way better than React.

  • Does React have a fadeIn() method? Nah, I don't think so. You need to install a react-transition-group package which weighs over 3GB.
  • Can you do $.get(https://stackoverflow.com/questions/12345/adding_two_numbers_javascript) in React? NOPE.
  • Remember React 3.3.1? Me neither, because they didn't make it. Meanwhile in jQuery land: https://code.jquery.com/jquery-3.3.1.min.js
  • Can you learn jQuery for free? Sure! Can you learn React for free? It'll be $500 USD and your left kidney for a conference ticket.

And many, many more.

(This is a completely serious lightning talk proposal, I promise.)

@SaraVieira
SaraVieira / gist file.md
Last active December 5, 2023 11:59
The Origin of Furries

In this talk we will be all discussing the origin of the furry fandom. How we will thogheter create a new furry-in-js framework. We will going over how they have changed the current fandom world, our hearts and the js world in 5 very awesome minutes! This talk is to prove a point that stars mean nothing in this case.

https://reactiveconf.com/

@kaievns
kaievns / unused.js
Created January 23, 2018 01:56
Finds unused react components in a project
const { execSync } = require('child_process');
const directory = 'src';
const findOut = execSync('find -L src').toString();
const filenames = findOut.trim().split('\n')
.filter(name => name.endsWith('.js'))
.map(name => name.replace('.js', '').replace('src/', '').replace(/\/index$/, ''));
console.log('Found', filenames.length, 'files in', directory);
@okonet
okonet / lightning_talk_proposal.md
Last active April 10, 2018 10:09
Make linting great again! -- ReactiveConf 2017 ⚡️talk proposal

Please 🌟 this gist to vote for this proposal!

Make linting great again!

tabs vs spaces

No other topic in software development probably has so much controversy as linting.

With a wrong workflow linting can be really a pain and will slow you and your team down. With a proper setup, though, it can save you hours of manual work reformatting the code and reducing the code-review overhead.

@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

import React, { Component, PropTypes } from 'react';
class OutsideClick extends Component {
static propTypes = {
children: PropTypes.any,
onClick: PropTypes.func.isRequired,
id: PropTypes.string,
tag: PropTypes.string,
className: PropTypes.string
}
@stegrams
stegrams / move.js
Last active May 28, 2016 12:32
Lane action in LaneStore for dragging a note over a note or an empy lane instead of attachToLane. Source: http://survivejs.com/webpack_react/implementing_dnd/
queryIds(searchIds){
let ids = [...searchIds];
return this.lanes.reduce((result, lane, laneIdx) => {
// no more ids
if(!ids.length) return result;
const notes = lane.notes;
const idsIndexOfLane = ids.indexOf(lane.id);
@ericjuta
ericjuta / index.jsx
Created May 20, 2016 12:57
Mobx HMR ES6 stores
import React from 'react'
import { render } from 'react-dom'
import { Router, browserHistory, match } from 'react-router'
import createStore from '../shared/lib/create-store.js'
import ContextProvider from '../shared/lib/context-provider.js'
import { fetchDataOnLocationMatch } from '../shared/lib/fetch-data.js'
import Root from './Root.jsx'
import routes from '../shared/routes.jsx'
import { AppContainer } from 'react-hot-loader'
import { observable, computed, autorun } from 'mobx'