Skip to content

Instantly share code, notes, and snippets.

@allexradu
allexradu / setup.md
Last active March 28, 2024 20:02 — forked from novemberborn/setup.md
OS X Setup virtual hosts on two different ports

Changes with .dev domains in mind.

Step 1 : Assign at least two IP address to your MAC OS (one per domain), let's say :

192.168.0.51
192.168.0.52

To setup the second IP you will have to add a second Ethernet Adapter (logical not physical).

@ondrek
ondrek / gist:7413434
Created November 11, 2013 13:48
Smallest Base64 image
data:image/gif;base64,R0lGODlhAQABAAAAACw=
@miguelmota
miguelmota / README.md
Last active March 28, 2024 19:59
Arch linux secure machine

Create new user

sudo useradd -m -s /bin/bash alice
sudo passwd alice

Add user to wheel (sudo) group

@FrancoNAle
FrancoNAle / imagenes.js
Created March 28, 2024 19:56 — forked from codigoconjuan/imagenes.js
Gist Soporte Imagenes WebP y Avif como Background
(function (document) {
var checkCount = 0,
formatFound = false;
function setHTMLClass(height, className) {
checkCount++;
if (height == 2) {
formatFound = true;
document.documentElement.className += " " + className;
} else {
@codigoconjuan
codigoconjuan / imagenes.js
Created August 4, 2021 21:43
Gist Soporte Imagenes WebP y Avif como Background
(function (document) {
var checkCount = 0,
formatFound = false;
function setHTMLClass(height, className) {
checkCount++;
if (height == 2) {
formatFound = true;
document.documentElement.className += " " + className;
} else {
@rvanbruggen
rvanbruggen / linkedin-query.py
Last active March 28, 2024 19:53 — forked from ThomasCabrol/linkedin-2-query.py
Python script to query your LinkedIn network and get all your network's connections and their interconnections.
#!/usr/bin/env python
# encoding: utf-8
"""
linkedin-query.py
Created by Thomas Cabrol on 2012-12-03.
Customised by Rik Van Bruggen
Copyright (c) 2012 dataiku. All rights reserved.
Building the LinkedIn Graph
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@mindplay-dk
mindplay-dk / session-life-cycle.md
Last active March 28, 2024 19:52
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().

@usagimaru
usagimaru / DumpAllMethods.swift
Last active March 28, 2024 19:52
Get all methods of an class or instance in Swift
// Dump all NSApplication’s class methods
let dump = NSApplication.perform(NSSelectorFromString("fp_methodDescription")).takeUnretainedValue() as? String
// Dump all NSApplication’s instance methods
let dump = NSApp.perform(NSSelectorFromString("fp_methodDescription")).takeUnretainedValue() as? String
// or
print(NSApplication.value(forKey: "fp_methodDescription"))
print(NSApp.value(forKey: "fp_methodDescription"))
@kalomaze
kalomaze / local_llm_glossary.md
Last active March 28, 2024 19:51
Local LLM Glossary v2

Kalomaze's Local LLM Glossary

Not super comprehensive (yet), but I think having up to date documentation like this should be quite helpful for those out of the loop. Things change all the time in local AI circles, and it can be dizzying to catch up from an outsider's perspective, especially if you are new to the more technical aspects of language models in general (and not just locally hosted LLMs).

Available Models

Llama

  • A language model series created by Meta. Llama 1 was originally leaked in February 2023; Llama 2 then officially released later that year with openly available model weights & a permissive license. Kicked off the initial wave of open source developments that have been made when it comes to open source language modeling. The Llama series comes in four distinct sizes: 7b, 13b, 34b (only Code Llama was released for Llama 2 34b), and 70b. As of writing, the hotly anticipated Llama 3 has yet to arrive.

Mistral

  • Mistral AI is a French company that also distributes open weight