Skip to content

Instantly share code, notes, and snippets.

@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active April 25, 2024 12:40
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@ruvnet
ruvnet / Readme.md
Created April 25, 2024 12:17
Deploying LLaMA 3 70B with AirLLM and Gradio on Hugging Face Spaces

Deploying LLaMA 3 70B with AirLLM and Gradio on Hugging Face Spaces

This tutorial guides you through the process of deploying a Gradio app with the LLaMA 3 70B language model using AirLLM on Hugging Face Spaces. The app provides a user-friendly interface for generating text based on user prompts.

Overview

  • LLaMA 3 70B: A large language model developed by Meta AI with 70 billion parameters, capable of generating coherent and contextually relevant text.
  • AirLLM: A Python library that enables running large language models like LLaMA on consumer hardware with limited GPU memory by using layer-by-layer inferencing.
  • Gradio: A Python library for quickly creating web interfaces for machine learning models, allowing users to interact with the models through a user-friendly UI.
  • Hugging Face Spaces: A platform for hosting and sharing machine learning demos, allowing easy deployment and access to Gradio apps.
@davidsklar
davidsklar / fix-broken-utf-8.php
Created August 25, 2015 17:23
Fixing Broken UTF-8
<?php
function fixBrokenUTF8($contents) {
static $replacement = chr(0xEF) . chr(0xBF) . chr(0xBD);
$expectingNewChar = true;
$expectedLength = 0;
$expectedIndex = 0;
$i = 0;
$out = "";
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 25, 2024 12:35
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.

@bbudd
bbudd / assets.md
Created June 13, 2019 12:30
Loading static assets using electron-forge v6 and the webpack plugin

I spent a few hours chasing down just how to get my static assets (css, fonts, images) to load in an Electron app built using electron-forge v6 (https://www.electronforge.io/) and its webpack plugin (https://www.electronforge.io/config/plugins/webpack) while in development mode. There really isn't any documentation available online, either in the electron-forge documentation or in places like blogs or gists or stackoverflow. So I thought I'd put it down here.

Step 1

Load CopyWebpackPlugin npm i -D copy-webpack-plugin


Step 2

Use the plugin to move your directories into place.

@JinKwonJeon
JinKwonJeon / gist:38d1fd3cbf65fff7a5b9a854dba46163
Created March 2, 2024 11:57
엑셀 시트 나누기 VBA 마스터 코드 (시트 & PDF 저장)
Public Enum ePrintMargin: xlNone = 0: xlNarrow = 1: xlNormal = 2: xlWide = 3: End Enum
Public Enum ePaperSize: xlA4 = 9: xlA3 = 8: xlLetter = 1: xlA5 = 11: End Enum
'-------------------------------------------------
Sub 엑셀파일로저장()
'여기를 선택 후, F5키를 누르면 각 시트를 나누어 저장합니다.
Dim Path As String: Path = GetFolderPath
If Path = "" Then MsgBox "올바른 폴더 경로를 선택하세요.": Exit Sub
@voluntas
voluntas / webrtc.rst
Last active April 25, 2024 12:30
WebRTC コトハジメ