Skip to content

Instantly share code, notes, and snippets.

View JacobMillner's full-sized avatar

Jacob Millner JacobMillner

View GitHub Profile
@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.

@0xabad1dea
0xabad1dea / copilot-risk-assessment.md
Last active September 11, 2023 10:21
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to

@ghifarit53
ghifarit53 / README.md
Last active September 6, 2020 00:12
[bspwm] Green Tea Setup

green tea setup

greentea01 greentea02

available config

  • bspwmrc
  • polybar
  • vimrc
  • Xresources
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@bespokoid
bespokoid / SpaceVim.md
Last active May 20, 2024 23:27
SpaceVim cheatsheet #tools

Preact + Material-UI example

Preact is a fast 3kB alternative to React with the same modern API.

This example uses shows how to use Material UI 4 with Preact X and Preact CLI 3.

How to use

git clone blah preact-mui
@daxxog
daxxog / hamachi-ubuntu.sh
Last active June 26, 2023 12:53
install hamachi on ubuntu 18.04
#!/bin/bash
#curl -L tinyurl.com/gothamachi | sh
cd ~/Downloads
wget https://www.vpn.net/installers/logmein-hamachi_2.1.0.198-1_amd64.deb
sudo apt -y install ./logmein-hamachi_2.1.0.198-1_amd64.deb
sudo hamachi check-update
sudo hamachi login
echo now run ->>
echo sudo hamachi attach [email]
@sebmarkbage
sebmarkbage / The Rules.md
Last active May 23, 2024 19:22
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@posener
posener / go-table-driven-tests-parallel.md
Last active April 30, 2024 20:34
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@nikhita
nikhita / update-golang.md
Last active May 23, 2024 07:48
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by: