Skip to content

Instantly share code, notes, and snippets.

View sefzig's full-sized avatar

Andreas Sefzig sefzig

View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active April 19, 2025 17:24
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

@mikowl
mikowl / oneliners.js
Last active February 19, 2025 05:20
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@andrei-markeev
andrei-markeev / get-data-from-excel.js
Created November 15, 2016 10:09
Get data from Excel file stored in SharePoint using Excel REST API
var fileRelativeUrl = "Shared%20Documents/book1.xlsx";
var sheetName = "Sheet1";
var range = "A1|J45";
var url = _spPageContextInfo.webServerRelativeUrl.replace(/\/$/, '') + "/";
loadXMLDoc(url + "_vti_bin/ExcelRest.aspx/" + fileRelativeUrl + "/model/Ranges('" + sheetName + "!" + range + "')?$format=atom", function (text) {
var parser = new DOMParser();
var excelRestNS = 'http://schemas.microsoft.com/office/2008/07/excelservices/rest';
var xmlDoc = parser.parseFromString(text, "text/xml");
var rows = xmlDoc.getElementsByTagNameNS(excelRestNS, 'row');
@Pathoschild
Pathoschild / google-sheets-color-preview.js
Last active August 1, 2024 21:43
A Google Sheets script which adds color preview to cells. When you edit a cell containing a valid CSS hexadecimal color code (like #000 or #000000), the background color is changed to that color and the font color is changed to the inverse color for readability.
/*
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a
valid CSS hexadecimal color code (like #000 or #000000), the background color will change to that
color and the font color will be changed to the inverse color for readability.
To use this script in a Google Sheets spreadsheet:
1. go to Tools » Script Editor;
2. replace everyting in the text editor with this code;
3. click File » Save;
@kerryrodden
kerryrodden / README.md
Last active January 18, 2021 11:05
Zoomable sunburst with updating data

I combined Mike Bostock's Zoomable Sunburst and Sunburst Partition examples, so that I could have both zooming and updating the underlying data (between count and size, in this case). A simple combination of the examples does not work; you have to edit the arcTween function used for updating the data, so that when it redraws the partition layout, it takes account of the current zoom level by adjusting the domain of the x scale.

Click on any arc to zoom in, and click on the center circle to zoom out. Use the Size/Count radio buttons to update the data.

@jdarling
jdarling / data.json
Last active March 24, 2025 21:35
D3 MindMap
{
"name": "Root",
"children": [
{
"name": "Branch 1",
"children": [
{"name": "Leaf 3"},
{"name": "Leaf 4"}
]
},
@metmajer
metmajer / README.md
Last active March 31, 2019 09:06
Zoomable Sunburst with Labels

Zoomable Sunburst with Labels

@franzenzenhofer
franzenzenhofer / jquery.bodysnatch.js
Created November 10, 2012 16:26
jquery plugin that replaces elements with absolute positioned clones of themselves, while hiding & silencing the originals
(function($){
isString = function (obj) {
return toString.call(obj) == '[object String]';
};
$.fn.bodysnatch = function() {
var collection = this;
return collection.each(function(a,b) {
var element = $(this);
var clone = element.clone();