Skip to content

Instantly share code, notes, and snippets.

View VitorNoVictor's full-sized avatar
🖖

Vitor Nunes VitorNoVictor

🖖
View GitHub Profile

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@VitorNoVictor
VitorNoVictor / 55-bytes-of-css.md
Created September 30, 2022 12:10 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@VitorNoVictor
VitorNoVictor / pull_apk.md
Created May 6, 2022 16:32 — forked from oozzal/pull_apk.md
Pull Apk from device
  1. Determine the package name of the app, e.g. "com.example.someapp". Skip this step if you already know the package name.

adb shell pm list packages

Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

  1. Get the full path name of the APK file for the desired package.
@VitorNoVictor
VitorNoVictor / system_template.txt
Created November 9, 2021 07:01
System Design Template
System Design Template
========================
(1) FEATURE EXPECTATIONS [5 min]
(1) Use cases
(2) Scenarios that will not be covered
(3) Who will use
(4) How many will use
(5) Usage patterns
@VitorNoVictor
VitorNoVictor / http_streaming.md
Created November 9, 2021 05:47 — forked from CMCDragonkai/http_streaming.md
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@VitorNoVictor
VitorNoVictor / clear_ivy.sh
Created May 9, 2021 16:35
Clear SBT Ivy cache
#!/usr/bin/env bash
# empty the ivy cache if you have good network
# rm -rfv ~/.ivy2/cache/*
# or even better just backup it to sync it later on ...
# mv ~/.ivy2/cache ~/.ivy2/cache.`date "+%Y%m%d_%H%M%S`.bak
# remove all sbt lock files
@VitorNoVictor
VitorNoVictor / LearnGoIn5mins.md
Created January 8, 2021 12:19 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins
@VitorNoVictor
VitorNoVictor / clear-git-history.txt
Last active December 4, 2020 10:08
Clear Git History
-- Delete the history
rm -rf .git
-- Recreate the repos from the current content only and also make sure the default branch is called "main"
git init
git add -A
git commit -m "Initial commit"
git branch -M main
-- Push to the github remote repos ensuring you overwrite history

Keybase proof

I hereby claim:

  • I am vitornovictor on github.
  • I am vitornovictor (https://keybase.io/vitornovictor) on keybase.
  • I have a public key ASBXDvE1ngD6PddEL-VATrt67Vr7P_Xas3F1o7ee8UMYoAo

To claim this, I am signing this object: