Skip to content

Instantly share code, notes, and snippets.

View PaulCapestany's full-sized avatar

Paul Capestany PaulCapestany

View GitHub Profile
@PaulCapestany
PaulCapestany / memgraph-graph-browser-connection.html
Created September 25, 2025 21:24 — forked from tonilastre/memgraph-graph-browser-connection.html
Run Cypher queries from browser and visualize graph results with Memgraph Orb
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Javascript Browser Example | Memgraph</title>
<script src="https://cdn.jsdelivr.net/npm/neo4j-driver"></script>
<script src="https://unpkg.com/@memgraph/orb/dist/browser/orb.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Mono&display=swap" rel="stylesheet">
@PaulCapestany
PaulCapestany / message-01.md
Created September 25, 2025 20:38 — forked from tonilastre/message-01.md
Content that explains GSS (Graph Style script) for the LLM

I want you to learn what Graph Style Script looks like so you can help generate GSS code on user request. Let's start with the introduction:

GSS (Graph Style Script) is a language for customizing the visual display of graphs.

Main building blocks

The main building blocks of Graph Style Script (GSS) are expressions and directives. GSS files are a sequence of expressions and directives.

Expressions

#!/bin/bash
# Example usage: test with 50 requests (first sequentially, then in parallel)
# ./test-embed.sh 50
# Configuration
MODEL=${MODEL:-"nomic-embed-text"} # Default model
NUM_REQUESTS=${1:-20} # Number of requests
HOST=${HOST:-"localhost"} # Ollama host
PORT=${PORT:-"11434"} # Ollama port
@PaulCapestany
PaulCapestany / bitcoin_hashrate_vs_price.csv
Created April 12, 2021 22:06
Bitcoin Hashrate vs Price
We can't make this file beautiful and searchable because it's too large.
"id","block_number","block_hash","fee_total_sat","fee_total_btc","fee_total_usd","price_btc","fee_per_kb_usd","block_size","difficulty","hashrate_network","time"
1,0,"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",0,0,0,0,0,285,1,"7158279",
2,1,"00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",0,0,0,0,0,215,1,"7158279",
3,2,"000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd",0,0,0,0,0,215,1,"7158279",
4,3,"0000000082b5015589a3fdf2d4baff403e6f0be035a5d9742c1cae6295464449",0,0,0,0,0,215,1,"7158279",
5,4,"000000004ebadb55ee9096c9a2f8880e09da59c0d68b1c228da88e48844a1485",0,0,0,0,0,215,1,"7158279",
6,5,"000000009b7262315dbf071787ad3656097b892abffd1f95a1a022f896f533fc",0,0,0,0,0,215,1,"7158279",
7,6,"000000003031a0e73735690c5a1ff2a4be82553b2a12b776fbd3a215dc8f778d",0,0,0,0,0,215,1,"7158279",
8,7,"0000000071966c2b1d065fd446b1e485b2c9d9594acd2007ccbd5441cfc89444",0,0,0,0,0,215,1,"7158279",
9,8,"00000000408c48f847aa786c2268fc3e6ec2af68e8468a34a28c61b7f1de0dc6",0,0,0,0

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@PaulCapestany
PaulCapestany / ripgrep-in-emacs.md
Created March 8, 2018 19:19 — forked from pesterhazy/ripgrep-in-emacs.md
Using ripgrep in Emacs using helm-ag (Spacemacs)

Why

Ripgrep is a fast search tool like grep. It's mostly a drop-in replacement for ag, also know as the Silver Searcher.

helm-ag is a fantastic package for Emacs that allows you to display search results in a buffer. You can also jump to locations of matches. Despite the name, helm-ag works with ripgrep (rg) as well as with ag.

How

import graphviz as gv
import sys
import json
graph = gv.Graph(format='svg')
lngraph = json.load(sys.stdin)
for node in lngraph['nodes']:
nodename = node['pub_key'][-6:]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZVkQgmH/RIIDkUhDq0nbVQg2xHdWAyjAvYEJ1CcNPn5F7LAkPYP6/ZqYy5QfxhLedfvS1KFOOIryhibNICQMA5LTkXVNEDZ3HHysDVEdom8VHFAfwIpMlKvXavSxToknh5mLm+Kbqloga8jzQJdDFDHwgrmlDzeB3fBwp13N9u3GJYwe16p7YNRL9AO5g2Hi7KuVPWbaY93pQOQDbDCId1avYk+qxKYB5bD6RYVtogNaY73SYCnCD0hZK/z2pMH9Tl3zq0lmqyKPhjXRLXT9vHTmEjez2lpPQCpOHSj5YUR1otcDPS17+KtHQVTLXd9UxQWeR9uOW9Y6hqDuQDMf
@PaulCapestany
PaulCapestany / main.go
Created October 24, 2016 20:06
s3 log parsing
package main
import (
"bufio"
"flag"
"fmt"
"io"
"log"
"os"
"regexp"