Skip to content

Instantly share code, notes, and snippets.

View ntodd's full-sized avatar

Nate Todd ntodd

  • Pixel Authority
View GitHub Profile
@SteffenDE
SteffenDE / ortex_mpnet.livemd
Created July 25, 2023 16:05
Running the all-mpnet-base-v2 sentence transformer in Elixir using Ortex

Ortex MPNet Sentence Transformer

Mix.install([
  {:ortex, github: "elixir-nx/ortex", ref: "9e384971d1904ba91e5bfa49594d742a1d06cb4c"},
  {:tokenizers,
   github: "elixir-nx/tokenizers", override: true, ref: "20295cfdf9b6342d723b405481791ec87afa203c"},
  {:exla,
   github: "elixir-nx/nx",
   sparse: "exla",
@s-macke
s-macke / gpt-4-tokens.txt
Last active June 4, 2024 13:06
All 100k GPT-4 Tokens. New lines are replaced with \n and carriage returns with \r. The index of the token is (index=line-1). The list is extracted using https://github.com/openai/tiktoken
!
"
#
$
%
&
'
(
)
*
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1">
<title>Simple Video Player</title>
</head>
<body>
<h3>Connection Aware Video Player</h3>
<video id="player" width="320" height="240" controls onclick="switchVideo" poster="https://res.cloudinary.com/demo/video/upload/w_320,h_240,f_auto,q_auto/test_video_r2tk5n.jpg" autoplay muted>
<source src="https://res.cloudinary.com/demo/video/upload/w_320,h_240,e_preview:duration_5,f_auto,q_auto/test_video_r2tk5n">
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active June 24, 2024 03:07
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@WeptunUser
WeptunUser / floatsign.sh
Last active January 1, 2022 21:23 — forked from mediabounds/floatsign.sh
Now fix when no entitlements are present.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
# Extension Copyright (c) 2013 Weptun Gmbh
# http://www.weptun.de
#
# Extended by Ronan O Ciosoig January 2012
#
# Extended by Patrick Blitz, April 2013
@izazueta
izazueta / visor-archivos-online.md
Last active July 20, 2023 09:32
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@jhradilek
jhradilek / .gitconfig
Created October 10, 2012 20:04
A Git alias to display the total number of insertions and deletions.
# Usage: git total [OPTION...]
#
# Options:
#
# In theory, the command accepts all command line options supported by
# the "git log" command. In reality, however, only few commit-limiting
# options are useful. This includes:
#
# --author=PATTERN, --committer=PATTERN
# Displays the number of lines changed by a certain author.
@joho
joho / gist:3735740
Created September 17, 2012 05:40 — forked from rafaelss/gist:3700977
PostgreSQL 9.2 upgrade steps
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/