Skip to content

Instantly share code, notes, and snippets.

@zprhhs
zprhhs / .config_coc_extensions_package.json
Last active April 18, 2024 07:06
coc.nvim & neovim configure
{
"dependencies": {
"coc-clangd": ">=0.28.0",
"coc-diagnostic": ">=0.23.9",
"coc-git": ">=2.6.1",
"coc-highlight": ">=2.0.4",
"coc-json": ">=1.8.0",
"coc-pairs": ">=1.4.2",
"coc-pyright": ">=1.1.293",
"coc-snippets": ">=3.1.6",
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 18, 2024 07:04
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@liziwl
liziwl / 华为历年机试题集合.md
Last active April 18, 2024 07:03
华为机考习题集

华为历年机试题集合


华为机试共3道题,分值分别为60,50,40。时长2小时,上机环境支持语言包括C/C++/Java

搜集的题目均来自网络:
题1~3 code
题4~6 code
题7 code
题8~9 code

@jctosta
jctosta / screen_cheatsheet.markdown
Last active April 18, 2024 07:03
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@mlabonne
mlabonne / finetune_llama2.py
Last active April 18, 2024 07:00
Easy Llama 2 fine-tuning script (📝 Article: https://tinyurl.com/finetunellama2)
# Based on younesbelkada/finetune_llama_v2.py
# Install the following libraries:
# pip install accelerate==0.21.0 peft==0.4.0 bitsandbytes==0.40.2 transformers==4.31.0 trl==0.4.7 scipy
from dataclasses import dataclass, field
from typing import Optional
import torch
from datasets import load_dataset
from transformers import (
@Aexylus
Aexylus / tailwind.config.ts
Created March 16, 2024 21:22
Tailwind vKitze with autocomplete
import type { Config } from 'tailwindcss';
import pluginCreator from 'tailwindcss/plugin';
export default {
content: ['./index.html', './app/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [
pluginCreator(function ({ addUtilities, theme }) {
@zOrg1331
zOrg1331 / wireguard_layer2.md
Last active April 18, 2024 06:59
wireguard, wireguard layer 2, wireguard over TCP

Intro

This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).

This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.

In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.

Objective

version: "3"
services:
sftpgo:
image: "drakkan/sftpgo:v2-alpine"
# default user id
user: 1026
restart: always
expose:
# HTTP
- "8080"
@SoabY
SoabY / JetBrains products Activation code until 15 May 2024
Created October 1, 2023 08:04
JetBrains products Activation code until 15 May 2024
8Z6IT0PIZH-eyJsaWNlbnNlSWQiOiI4WjZJVDBQSVpIIiwibGljZW5zZWVOYW1lIjoiSHVuYW4gTm9ybWFsIFVuaXZlcnNpdHkiLCJhc3NpZ25lZU5hbWUiOiJTdGFyayB6aGFuZyIsImFzc2lnbmVlRW1haWwiOiJzdGFyazE5ODUyMDIwQGdtYWlsLmNvbSIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyNC0wNS0xNSIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZW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