gengwg@gengwg-mbp:~$ git clone https://github.com/ggerganov/llama.cpp.git
Cloning into 'llama.cpp'...
remote: Enumerating objects: 5267, done.
remote: Counting objects: 100% (2065/2065), done.
remote: Compressing objects: 100% (320/320), done.
remote: Total 5267 (delta 1878), reused 1870 (delta 1745), pack-reused 3202
Receiving objects: 100% (5267/5267), 4.24 MiB | 13.48 MiB/s, done.
# Clone llama.cpp | |
git clone https://github.com/ggerganov/llama.cpp.git | |
cd llama.cpp | |
# Build it | |
make clean | |
LLAMA_METAL=1 make | |
# Download model | |
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin |
#!/bin/bash | |
# Script: backup-restore.sh | |
# Description: A script to perform backup and restore operations for a MongoDB database. | |
# Author: Aakash Gajjar | |
# Last modified: 2023-06-03 | |
# S3 bucket to upload database backup file | |
bucketName="" |
Being apart of several different architecture teams throughout my career, I have learned alot about data organization from the core data to the frontend interfaces to everything in-between. Generally, every single architecture survives off what I am coining as the Five Star Architecture (FSA). The FSA essentially encompasses five different tiers, each with their specific resposibilities and methodologies.
The following is a high-level diagram of the tiers including the communication protocol(s):
FROM node:slim | |
# We don't need the standalone Chromium | |
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | |
# Install Google Chrome Stable and fonts | |
# Note: this installs the necessary libs to make the browser work with Puppeteer. | |
RUN apt-get update && apt-get install gnupg wget -y && \ | |
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ | |
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ |
Crossing reviews becomes a very common activity today in engineering behavior. To help us review changes for pull/merge requests easier, sorting imports can help us a much. The codebase becomes more professional and more consistent, reviewers will be happier, and the review process will be faster, focusing on the implementation changes ONLY.
Have you ever thought about how to sort imports in TypeScript projects automatically?
Let me show you how to archive sorting imports automatically in TypeScript projects with ESLint!
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true
#!/bin/bash | |
MESSAGE="Message" | |
SLACK_CHANNEL="#slack-channel" | |
SLACK_TOKEN=xoxb-1234-000000000000 | |
curl -X POST \ | |
-H "Authorization: Bearer $SLACK_TOKEN" \ | |
-H "Content-type: application/json; charset=utf-8" \ | |
--data '{"channel":"'$SLACK_CHANNEL'","text":"'"$MESSAGE"'"}' \ |
One cool feature of React which isn't highlighted that often are "error boundaries".
Error boundaries can catch errors which are thrown inside your component during a lifecycle. You can use them in very fine-granular levels wrapping very small components (but I rarely see this) or you can wrap your whole app and show some fallback content, if an error happens. But you can also wrap something in between those extrem ranges and add a proper reset. Also it's not a hidden secret how to do that I haven't see a lot of people talking about that. So here is a small example which use react-router-dom
to do that. You can see the complete example here.
Let's imagine you have the following app:
import * as React from 'react';
import { render } from 'react-dom';
import { Link, BrowserRouter, Switch, Route, Redirect } from 'react-router-dom';