Skip to content

Instantly share code, notes, and snippets.

@EQuimper
EQuimper / vscode.txt
Last active December 5, 2018 03:12
VS CODE PACKAGES
5 TOP PACKAGES
1. Path Intellisense
2. Project Manager
3. Auto Rename Tag
4. JavaScript (ES6) code snippets
5. Output Colorizer
You need to have
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 15,
"editor.fontFamily": "Consolas",
"editor.tabSize": 2,
"editor.wordWrapColumn": 80,
"editor.fontLigatures": true,
"editor.snippetSuggestions": "top",
"editor.minimap.enabled": true,
"files.exclude": {
@threepointone
threepointone / infinite.js
Created December 20, 2016 08:44
infinite scrolling pattern with react fiber (featuring intersection observers)
// inifinite scrolling of content without extra wrappers
const { render, findDOMNode } = ReactDOMFiber
class App extends React.Component {
render() {
// wrap the root element with an Intersection Observer, exposing .observe for children
return <Intersection>
<div style={{ height: 200, overflow: 'auto' }}>
<Page offset={0} count={10} />
</div>
var HashMap = function() {
this.length = 0;
this._slots = [];
this._capacity = 8;
this._secret = (Math.random() * 65536) | 0;
};
HashMap.MAX_LOAD_RATIO = 0.9;
HashMap.SIZE_RATIO = 3;
HashMap._hashString = function(string) {
@olexpono
olexpono / portfolio_advice.md
Last active January 25, 2023 04:32
Thinkful Portfolio Q&A, Tips & Tricks

Portfolio Advice

These are the take-aways from my Q&A sessions working with students on their portfolios at Thinkful. Hopefully these guidelines will make building a successful portfolio site straightforward.

Recommended contents

Keep it simple! Unless you have a blog, or some other major section to your site, it's likely that you don't even need a navigation. In practice, making a "cool reveal" or an awesome unique style is much better than packing in more pages and more projects. Here are the critical sections.

@jfmengels
jfmengels / lodash-fp-documentation.md
Last active February 6, 2024 20:57
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@Avaq
Avaq / combinators.js
Last active July 15, 2024 14:46
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@manigandham
manigandham / rich-text-html-editors.md
Last active June 10, 2024 15:49
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

@mpj
mpj / temp.md
Created November 22, 2015 21:19
bah

5 tips to quickly understand a new code base

When you work as a programmer, it’s only a small percentage of your time that is spent on writing code. The vast majority of your time is spent trying to understand code that is already written. Either code of others, or code that you yourself wrote a last year.

It’s especially tricky to get into a completely new codebase. You might when you start a new job or perhaps your team takes ownership of a new system.

I have done this a couple of times now, and I have a process for it now, and I figure that it might be interesting to some people to hear about it, and that is what we are going to explore today.

In case you’re new - this is FunFunFunction, a weekly show where we try to become more confident and excited about programming by exploring old wisdom, wild ideas and having fun. At the end of this episode, I’m going to ask to subscribe.

@air
air / flip.html
Last active March 12, 2023 07:29
flip colours and images at 60fps
<html>
<!--
- GIF is too slow
- flipping colours in JS is easy
- Using backgroundImage is flickery
- With preload: fixed!
-->
<head>
<style>
body {