| publishDate | author | title | excerpt | image | category | tags | |
|---|---|---|---|---|---|---|---|
2024-08-12 08:45:00 UTC |
skeptrune (Nick K) |
History of HackerNews Search: From 2007 to 2024 |
The history of HackerNews (HN) search spans three generations. Starting in 2007 with Disqus founder Jason Yan followed by a series of other sites, Octopart/ThriftDB-powered HNSearch in 2011, and finally Algolia-powered search from 2014 to today. |
History |
|
This file contains hidden or 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
| // use the below command to run the script and get the output txt file | |
| // npm install -g bun - if you don't have bun installed | |
| // bun run transcript-demo.ts | |
| const transcript = [ | |
| "Where 0 = Kirill Kulakov, 1 = Yoav, 2 = skeptrune", | |
| "0: Appreciate it.", | |
| "1: Yeah, welcome.", | |
| "1: So yeah.", | |
| "1: So Nick, you know, I'd love to dive a little bit deeper.", |
This file contains hidden or 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 fs = require('fs'); | |
| const childProcess = require('child_process'); | |
| const GITHUB_ACCESS_TOKEN = process.env.GITHUB_ACCESS_TOKEN; | |
| const inputDirectory = './docs'; | |
| const outputDirectory = './htmldocs'; | |
| fs.readdirSync(inputDirectory).filter(file => file.endsWith('.md')).forEach(file => { |
This file contains hidden or 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
| pub async fn timeout_safe_convert_html_to_text(html: &str) -> String { | |
| match tokio::time::timeout(std::time::Duration::from_secs(1), async { | |
| convert_html_to_text(html) | |
| }) | |
| .await | |
| { | |
| Ok(text) => text, | |
| Err(_e) => { | |
| log::error!("Error converting this html to text in 1s: {:?}", html); | |
| sentry::capture_message( |
This file contains hidden or 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
| docker build -t actix-frontend -f ./actix-frontend/Dockerfile.actix-frontend . |
This file contains hidden or 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
| curl -fsSL https://get.docker.com -o get-docker.sh | |
| sudo sh get-docker.sh |
This file contains hidden or 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
| redis = { version = "0.25", features = [ | |
| "tokio-rustls-comp", | |
| "aio", | |
| "connection-manager", | |
| ] } | |
| actix-extensible-rate-limit = { version = "0.3.1", features = ["redis"] } |
This file contains hidden or 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
| foo.bar.com { | |
| root * /home/git_projects/trieve-hn-discovery/frontend/dist | |
| try_files {path} {path}/ /index.html | |
| file_server | |
| } |
This file contains hidden or 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
| // TODO: latency optimize this so it can be uncommented | |
| if phrases.is_empty() { | |
| let potential_query_split_whitespace = potential_query.split_whitespace().collect_vec(); | |
| if potential_query_split_whitespace.len() > 5 { | |
| continue; | |
| } | |
| let query_without_stop_words = potential_query | |
| .split_whitespace() | |
| .filter(|word| !stop_words.contains(&word.to_lowercase())) | |
| .collect::<Vec<&str>>(); |
This file contains hidden or 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
| I need to upload image in comment |