Skip to content

Instantly share code, notes, and snippets.

View msell's full-sized avatar

Matt Sell msell

View GitHub Profile
@kfox
kfox / README.md
Last active December 4, 2023 11:08
TCP echo server for Node.js

TCP echo server for Node.js

Usage

  1. Make sure you have a modern-ish version of Node.js installed.
  2. Type npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
  3. Connect to it from a client, e.g. netcat or similar: nc localhost 9000
@bforrest
bforrest / AnotherWay.md
Last active January 24, 2023 21:41
An experimental way of working

An experimental new way of working

At the heart of agile software development is the first enumerated principle from the Manifesto for Agile Software Development:

Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.

We have fallen into a pattern of not having demonstrable software when an increment concludes. There are heavy sighs when the question arises of what is there to show at product review.

I propose remedying this unvirtuous cycle by trying an experiment. This radical idea is to focus on The Most Important Thing. We spend time bandying about number of developers and weeks. We don't spend much attention to what is Important. If something is important we should attack it with virgor and defer new work until completing Important Thing.

This approach ensures that things get completed. Time spent 'in-progress' for the Epic is minimal. We've all see the task/story that sits at 80% done for 9

@sibelius
sibelius / useSubmit.tsx
Created October 31, 2019 19:17
useSubmit hook to make sure you don't call onSubmit twice
import { useState, useRef, useCallback } from 'react';
export const useSubmit = (fun: Function) => {
const [isPending, setIsPending] = useState<boolean>(false);
const pendingRef = useRef(null);
const submit = useCallback((...args) => {
if (pendingRef.current) {
return;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Jigsaw puzzle</title>
<script type="text/javascript">
function save(filename, data)
{
var blob = new Blob([data], {type: "text/csv"});
@jgautheron
jgautheron / CategorySagas.js
Created March 22, 2017 19:07 — forked from pesakitan22/CategorySagas.js
Redux-Saga for next.js
import {call, put, take, fork} from 'redux-saga/effects'
import {END} from 'redux-saga'
import CategoryActions, {CategoryTypes} from '../Redux/CategoryRedux'
// attempts to fetch category
export function* fetchCategoryServer (api) {
let action = yield take(CategoryTypes.CATEGORY_SERVER)
// check when it stopped
while (action !== END) {
yield fork(fetchCategoryAPI, api)
@vasanthk
vasanthk / System Design.md
Last active November 17, 2024 23:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@Shoozza
Shoozza / agent.cmd
Last active April 20, 2022 02:45
Make Cmder work with ssh-agent
@ECHO OFF
SETLOCAL
GOTO:MAIN
REM
REM Info functions start
REM
REM Display version and copyright information
:VERSION
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@tarlepp
tarlepp / BaseController.js
Last active October 22, 2015 04:32
Generic count method
/**
* api/services/BaseController.js
*
* Base controller for all sails.js controllers. This just contains some common code
* that every controller uses
*/
'use strict';
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil');