Skip to content

Instantly share code, notes, and snippets.

View michaelbromley's full-sized avatar
👨‍💻
Writing colourful text files

Michael Bromley michaelbromley

👨‍💻
Writing colourful text files
View GitHub Profile
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@acutmore
acutmore / README.md
Last active October 29, 2024 06:03
Emulating a 4-Bit Virtual Machine in (TypeScript\JavaScript) (just Types no Script)

A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.

Syntax emits zero JavaScript.

type RESULT = VM<
  [
    ["push", N_1],         // 1
    ["push", False],       // 2
 ["peek", _], // 3
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@zhenwenc
zhenwenc / buildSchema.js
Last active November 3, 2021 22:48
Generate Apollo API based on remote GraphQL schema merging with schemas for local state
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const https = require('https');
const yargs = require('yargs');
const fetch = require('node-fetch');
const { parse, execute, buildSchema } = require('graphql');
const { makeExecutableSchema } = require('graphql-tools');
@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.

@sadikaya
sadikaya / git-bash-in-webstorm.md
Last active September 23, 2024 17:50
git bash inside Webstorm terminal

Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.

for 64bit:

"C:\Program Files\Git\bin\sh.exe" --login -i

for 32bit:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit master origin/master
up = pull --rebase
save = !git add -A && git commit -m 'SAVEPOINT'
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
@btroncone
btroncone / rxjs_operators_by_example.md
Last active November 7, 2024 09:19
RxJS 5 Operators By Example
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@staltz
staltz / introrx.md
Last active November 19, 2024 18:00
The introduction to Reactive Programming you've been missing