Skip to content

Instantly share code, notes, and snippets.

@slok
slok / pprof.md
Last active May 4, 2024 11:28
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@bvaughn
bvaughn / index.md
Last active May 4, 2024 11:25
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 4, 2024 11:25
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@mattt
mattt / main.swift
Last active May 4, 2024 11:22
NaturalLanguage Framework - NLTagger Language Support Matrix
import NaturalLanguage
let languages: [NLLanguage] = [
.amharic, .arabic, .armenian, .bengali, .bulgarian,
.burmese, .catalan, .cherokee, .croatian, .czech,
.danish, .dutch, .english, .finnish, .french,
.georgian, .german, .greek, .gujarati, .hebrew,
.hindi, .hungarian, .icelandic, .indonesian, .italian,
.japanese, .kannada, .khmer, .korean, .lao,
.malay, .malayalam, .marathi, .mongolian, .norwegian,
@ErxrilOwl
ErxrilOwl / laravel_aws_ami_deploy.md
Last active May 4, 2024 11:17
Deploy Laravel Project on AWS EC2 AMI

Deploying Laravel Application on AWS EC2

Reference

Launch the instance

Select Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type

Configure Security Group

Add rule of HTTP and HTTPS

Launch Amazon RDS Database

@judaew
judaew / keychron_k2.adoc
Last active May 4, 2024 11:15
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@cseeman
cseeman / markdown_examples.md
Created September 15, 2023 16:48
Markdown for info panel/warning box

Examples for how to create your own info panel, warning box and other decent looking notification in GitHub markdown.

All the boxes are single/two cell tables or two row tables.

Warning box

❗ You have to read about this
@mdutt247
mdutt247 / Laravel File Permission
Last active May 4, 2024 11:14
Correct way to set up file and directory permissions in Laravel
# Author: M. Dutt (hello@mditech.net)
# Date: 20/11/2023
# Purpose: Correct file and directory permissions of Laravel project.
#
Change the owner and group of your Laravel project.
sudo chown -R developer:www-data /var/www/project
OR
sudo chown -R developer:apache /var/www/project
@matthewjberger
matthewjberger / instructions.md
Last active May 4, 2024 11:12
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@chetan
chetan / yardoc_cheatsheet.md
Last active May 4, 2024 11:12
YARD cheatsheet