Skip to content

Instantly share code, notes, and snippets.

View saveroo's full-sized avatar

Muhammad Surga Savero saveroo

View GitHub Profile
@hthuong09
hthuong09 / b64url-np.md
Created November 14, 2019 17:58 — forked from catwell/b64url-np.md
Decoding Base64-URL without padding

Decoding Base64-URL without padding

1) Add padding

Divide the length of the input string by 4, take the remainder. If it is 2, add two = characters at the end. If it is 3, add one = character at the end.

You now have Base64-URL with padding.

2) Translate to Base64

@franciscocpg
franciscocpg / README.md
Last active May 13, 2024 08:48
Import mitm certificate to CA in arch linux
  1. After installing mitmproxy run it (just type mitmproxy) in a terminal session and quit. This will create the necessaries certificates files at ~/.mitmproxy.

  2. Extract the certificate to .crt format:
    openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt

  3. Trust the certificate into CA:
    sudo trust anchor ca.crt

  4. Run the mitmproxy again

@prakashpandey
prakashpandey / CustomResponseWriter.go
Last active March 19, 2024 21:34
Implement custom http.ResponseWriter in golang
package main
import (
"fmt"
"net/http"
)
type CustomResponseWriter struct {
body []byte
statusCode int
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active June 29, 2024 22:33
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@iamandrewluca
iamandrewluca / oss-tools.md
Last active May 24, 2024 08:20
Open source software tools
@bmaupin
bmaupin / free-backend-hosting.md
Last active June 27, 2024 09:25
Free backend hosting
@DawidMyslak
DawidMyslak / vue.md
Last active April 22, 2024 12:49
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@addyosmani
addyosmani / workbox.md
Last active January 20, 2024 16:14
Workbox recipes

Workbox runtime caching recipes

Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:

importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();

// Placeholder array populated automatically by workboxBuild.injectManifest()
@mkhuda
mkhuda / obat.rb
Created July 6, 2017 13:05
Obat Mujarab
case @obat
when "sering sakit"
"puasa sunnah"
when "wajah terlihat murung tidak bercahaya"
"shalat malam tahajud"
when "hati sempit"
"baca Al-Quran dan maknanya"
when "tidak bahagia"
"shalat diawal waktu"
@saurabhshri
saurabhshri / pip.md
Last active June 7, 2024 12:58
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

How?