Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const payload = {name: 'text'}; | |
(require('fs')).writeFileSync(`dump-${Date.now()}.json`, JSON.stringify(payload)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Inspect the generated statements before you actually execute: comment RAISE and uncomment the EXECUTE | |
DO | |
$do$ | |
DECLARE | |
_tbl text; | |
BEGIN | |
FOR _tbl IN | |
SELECT c.oid::regclass::text -- escape identifier and schema-qualify! | |
FROM pg_catalog.pg_class c | |
JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Heavily inspired by https://haluk.github.io/posts-output/2020-10-19-linux/ | |
# Replace <IFNAME> with wifi device name | |
# Replace <IDENTITY> with student identity (i.e. <USERNAME>@ntnu.no) | |
# Replace <PASSWORD> with user password | |
nmcli con add \ | |
type wifi \ | |
ifname <IFNAME> \ | |
con-name eduroam \ | |
ssid eduroam \ |
This is a full account of the steps I ran to get llama.cpp
running on the Nvidia Jetson Nano 2GB. It accumulates multiple different fixes and tutorials, whose contributions are referenced at the bottom of this README.
At a high level, the procedure to install llama.cpp
on a Jetson Nano consists of 3 steps.
- Compile the
gcc 8.5
compiler from source.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jobsMachineConfig = Machine({ | |
id: "jobsAdmin", | |
initial: "loading", | |
context: { | |
jobs: [], | |
jobCategory: "All", | |
jobPolling: true, | |
selectedJob: undefined, | |
error: undefined, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jobsMachineConfig = Machine({ | |
id: "jobsAdmin", | |
initial: "loading", | |
context: { | |
jobs: undefined, | |
selectedJob: undefined, | |
error: undefined, | |
}, | |
states: { | |
loading: { |
A breakdown of a project that uses XState to manage state for authenticating a user with Cognito, and then finding the authorized application user with an invoked machine.
- create auth machine
- create auth context
- handle AWS authentication
- once user authenticates with Cognito, redirect to user route to get user from db
- at user route use
userMachine
service fromauthMachine
to get application user - once associated application user is found, send user to organization route to allow user to associate session with specific organization
A breakdown of a project that uses XState to manage state for authenticating a user with Cognito, and then finding the authorized application user with an invoked machine.
- create auth machine
- create auth context
- handle AWS authentication
- once user authenticates with Cognito, redirect to user route to get user from db
- at user route use
userMachine
service fromauthMachine
to get application user - once associated application user is found, send user to organization route to allow user to associate session with specific organization
NewerOlder