Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 06:45
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 18, 2024 06:45
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ky28059
ky28059 / vercel.md
Last active April 18, 2024 06:44
Deploying to Vercel from an organization for free using GitHub actions

This gist was partially inspired by this blog about Next.js Vercel CI with GitHub actions.

The problem

An easy way to deploy and host websites for free is to use GitHub pages. If you've deployed a Next.js project to GitHub pages, you may have used a GitHub action similar to this in the past to automatically redeploy the site when a new commit is pushed:

# gh-pages-merge.yml
name: Deploy to gh-pages on merge
on:
  push:
@gsoykan
gsoykan / tensor_2_cv2.py
Created March 10, 2023 19:23
pt tensor to cv2 image
import cv2
import numpy as np
import torch
# Create a random torch tensor
tensor = torch.randn(3, 256, 256)
# Convert the tensor to a numpy array
numpy_image = tensor.numpy()
@silphendio
silphendio / frankenmerge-test.py
Last active April 18, 2024 06:40
Cutting up a llama and putting it back together
# A simple script to demonstrate the sclicing and recombination of models at runtime
# inspired by mergekit
# Sadly, it doesn't work with quantisized models.
#
# public domain - silphendio
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
import torch
model_path = 'gpt2' # huggingface name or local folder
@tatsuyasusukida
tatsuyasusukida / !README-javascript-audio.md
Last active April 18, 2024 06:40
🎵 How to record audio using the Web Audio API in JavaScript

🎵 How to record audio using the Web Audio API in JavaScript

Demo video: How to record audio using the Web Audio API in JavaScript

About this article

This article describes how to record audio using the Web Audio API in JavaScript. The related resources are shown below.

@gundamew
gundamew / example.md
Created January 20, 2022 10:43
Installing Obsidian (AppImage) on Ubuntu 20.04

1. Move the AppImage to /opt

$ sudo mkdir -p /opt/Obsidian
$ mv ~/Downloads/Obsidian-0.13.19.AppImage /opt/Obsidian

2. Create the desktop entry

@mattbell87
mattbell87 / remote-wsl.md
Last active April 18, 2024 06:38
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
ZohoBooks.fullaccess.all
or
ZohoBooks.vendorpayments.ALL,ZohoBooks.settings.ALL,ZohoBooks.salesorders.ALL,ZohoBooks.purchaseorders.ALL,ZohoBooks.projects.ALL,ZohoBooks.invoices.ALL,ZohoBooks.expenses.ALL,ZohoBooks.estimates.ALL,ZohoBooks.debitnotes.ALL,ZohoBooks.customerpayments.ALL,ZohoBooks.creditnotes.ALL,ZohoBooks.contacts.ALL,ZohoBooks.bills.ALL,ZohoBooks.banking.ALL,ZohoBooks.accountants.ALL