Skip to content

Instantly share code, notes, and snippets.

View bdx0's full-sized avatar

Dương Bảo Duy bdx0

View GitHub Profile
@bdx0
bdx0 / LazyVIM.md
Created July 24, 2024 08:52 — forked from danielkec/LazyVIM.md
LazyVIM

Default shortcuts

Ctrl+h        select file tree
Ctrl+l        select file editor
Shift+h       left editor tab
Shift+l       right editor tab
Alt+j         move current line up
Alt+k         move current line down
double space  filename search(telescope) - `Ctrl+d` and `Ctrl+u` to scroll preview
@bdx0
bdx0 / appsScript_ListFilesFolders_Mesgarpour.js
Created July 18, 2024 06:10 — forked from nk-gears/appsScript_ListFilesFolders_Mesgarpour.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/**
* Google Apps Script - List all files & folders in a Google Drive folder, & write into a speadsheet.
* - Main function 1: List all folders
* - Main function 2: List all files & folders
*
* Hint: Set your folder ID first! You may copy the folder ID from the browser's address field.
* The folder ID is everything after the 'folders/' portion of the URL.
*
* @version 1.0
* @see https://github.com/mesgarpour
@bdx0
bdx0 / appsScript_ListFilesFolders_ver.2.js
Created July 18, 2024 06:09 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@bdx0
bdx0 / gist:0c48b537e52c74e73815497abed6543f
Created July 3, 2024 07:16 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@bdx0
bdx0 / llama-7b-m1.md
Created October 30, 2023 05:46 — forked from cedrickchee/llama-7b-m1.md
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

@bdx0
bdx0 / 01 Install Unison Linux
Created September 8, 2023 07:47 — forked from jbeda/01 Install Unison Linux
Unison install
# linux
UNISON_VERSION=2.48.4
sudo apt-get -y install inotify-tools ocaml-nox build-essential
curl -L https://github.com/bcpierce00/unison/archive/${UNISON_VERSION}.tar.gz | tar zxv -C /tmp
cd /tmp/unison-${UNISON_VERSION}
sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c
make UISTYLE=text NATIVE=true STATIC=true
cp src/unison src/unison-fsmonitor ~/bin
# You should modify your path to include ~/bin
@bdx0
bdx0 / PAT
Last active October 2, 2023 10:03
dotfile-bootstrap
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
/// See http://dartbug.com/22036
library has_permission;
import 'dart:io';
enum FilePermission { READ, WRITE, EXECUTE, SET_UID, SET_GID, STICKY }
enum FilePermissionRole { WORLD, GROUP, USER }
bool hasPermission(FileStat stat, FilePermission permission, {FilePermissionRole role: FilePermissionRole.WORLD}) {
@bdx0
bdx0 / scoop_install.bat
Created May 15, 2022 07:13 — forked from zhangzhishan/scoop_install.bat
install software using scoop
scoop install git
scoop bucket add extras
scoop bucket add Versions
scoop bucket add Ash258 'https://github.com/Ash258/scoop-Ash258.git'
scoop bucket add nerd-fonts
; picgo
; scoop bucket add helbing https://github.com/helbing/scoop-bucket
sudo scoop install 3270-NF
scoop install ack
@bdx0
bdx0 / record.py
Created April 11, 2022 04:27 — forked from korakot/record.py
Record audio in Colab using getUserMedia({ audio: true })
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))