Skip to content

Instantly share code, notes, and snippets.

View Himachallad's full-sized avatar
:electron:
Warming up

Himachallad

:electron:
Warming up
View GitHub Profile
@Himachallad
Himachallad / normcore-llm.md
Created October 2, 2024 17:58 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

/**
* Can be defined as a config
**/
const updateCount = 1000;
const allowedRollForDbUpdate = 5
const updateViews = () => {
const currentRoll = Math.round(Math.random()*updateCount);
if(currentRoll === allowedRollForDbUpdate) {
...write 1000 views to DB
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for (let registration of registrations) {
registration.unregister();
}
});
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();
} })
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister()
} })
async function updateCacheFromResponse(cache, request, fetchResponse) {
if (fetchResponse.status >= 200 && fetchResponse.status < 300) {
await cache.put(request, fetchResponse);
}
console.log("Cache updated");
}
/**
* Lazily updates cache in background from network
* @param {*} request
*/
/**
* Activates the new service worker and clean old cache incase of version changes
*/
self.addEventListener("activate", (event) => {
const currentCaches = [UNVARYING_CACHE, VOLATILE];
event.waitUntil(
caches
.keys()
.then((cacheNames) => {
return cacheNames.filter(
/**
* We can precache the image urls, fonts as they don't update frequently
*/
self.addEventListener("install", (installEvent) => {
installEvent.waitUntil(
caches
.open(UNVARYING_CACHE)
.then((cache) => cache.addAll(CACHED_ONLY_URLS))
.then(() => {
console.log(
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
navigator.serviceWorker.register("/service-worker.js").then(
function (registration) {
// Registration was successful
console.log(
"ServiceWorker registration successful with scope: ",
registration.scope
);
},
@Himachallad
Himachallad / meta-tags.md
Created July 12, 2020 21:36 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">