Skip to content

Instantly share code, notes, and snippets.

View Luke-SNAW's full-sized avatar

Luke SNAW Luke-SNAW

View GitHub Profile
@Luke-SNAW
Luke-SNAW / rename.md
Created October 15, 2021 05:45
[How can I change the author name / email of a commit?] #git

Another way is to use Git's "filter-branch" command. It allows you to batch-process a (potentially large) number of commits with a script.

You can run the below sample script in your repository (filling in real values for the old and new email and name):

$ git filter-branch --env-filter '
WRONG_EMAIL="wrong@example.com"
NEW_NAME="New Name Value"
@Luke-SNAW
Luke-SNAW / search-engine.md
Last active October 18, 2021 00:08
[검색엔진 검색결과 삭제관련 링크] #google #yahoo #bing
@Luke-SNAW
Luke-SNAW / MacOS.md
Last active October 20, 2021 23:32
[Tools] #articles
@Luke-SNAW
Luke-SNAW / Github-actions__S3__Codedeploy.md
Last active October 25, 2021 00:33
[Devops] #articles

AWS

IAM policy

  • s3:PutObject
  • codedeploy:deploymentconfig:CodeDeployDefault.AllAtOnce
@Luke-SNAW
Luke-SNAW / index.md
Last active October 28, 2021 04:32
[Clean pattern for handling roles and permissions in large-scale React apps] #auth #API
@Luke-SNAW
Luke-SNAW / after-install__test.sh
Last active October 29, 2021 06:40
[Deploy by git pull on server] #aws #github
#!/bin/bash
cd /var/www/html/biz
ssh -vT git@github.com # https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey#always-use-the-git-user
git fetch --prune
git checkout origin/test
git pull origin test
@Luke-SNAW
Luke-SNAW / index.md
Created October 31, 2021 23:49
[An Architecture for Life] You have three functions. MuZero calls them h (representation), g (dynamics), and f (prediction). #bio #ML

https://geohot.github.io//blog/jekyll/update/2021/10/29/an-architecture-for-life.html

A representation function takes in the sensor data and transforms the manifold to something more learnable, referred to as the “hidden state”. It may discard non task relevant information. This can be a VAE, GAN, pretrained ImageNet, custom trained conv net, or in the case of GPT-3, handcoded as BPE.

A dynamics function deals with long term temporal correspondences. It functions as both a summarizer of the past and a predictor of the future, in the same way a Kalman filter does. This can be a couple dense layers, a transformer, or an RNN/GRU/LSTM. I guess it even could be a Kalman filter itself.

A prediction function tells you how to act in a state. It can do this by directly outputting an action or by outputting a value of this state allowing you to search.

@Luke-SNAW
Luke-SNAW / index.md
Last active November 1, 2021 00:49
[6 Concrete Tips That Will Make Your React Pull Requests Easier To Review] https://www.chakshunyu.com/blog/6-concrete-tips-that-will-make-your-react-pull-requests-easier-to-review/ #git
  • Include The Purpose Of The Pull Request
  • Share Screenshots Of Visual Changes
  • Provide Feature Requirements
  • Elaborate On New Dependencies
    • choosing a library to add to the codebase is an elaborate process requiring a lot of decisions
  • Avoid Complex JavaScript Constructions
  • Provide Additional Instructions On How To Review
@Luke-SNAW
Luke-SNAW / index.md
Last active November 1, 2021 03:30
[New HTTP standards for caching on the modern web] https://httptoolkit.tech/blog/status-targeted-caching-headers/ #http #cache

Why does caching matter?

If you're running a high-profile user-facing web application, caches and CDNs are absolutely critical to providing good performance for end users at a reasonable cost. Caches and CDNs sit in front of your web server, acting as a reverse proxy to ensure that:

  • Content is cached, so your backend server only receives occasional requests for static content, not one request direct from every visitor.
  • Content delivery is resilient to traffic spikes, because static caches scale far more easily than application servers.
  • Content requests are batched, so 1000 simultaneous cache misses become just a single request to your backend.