Skip to content

Instantly share code, notes, and snippets.

View Andromelus's full-sized avatar

user Andromelus

View GitHub Profile
@drorata
drorata / gist:146ce50807d16fd4a6aa
Last active June 3, 2024 06:00
Minimal Working example of Elasticsearch scrolling using Python client
# Initialize the scroll
page = es.search(
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
})
@tomnomnom
tomnomnom / simple-json-api.go
Created December 20, 2014 16:34
Simple JSON API Server in Go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
// The `json:"whatever"` bit is a way to tell the JSON
@tnewman
tnewman / atoi.asm
Last active January 2, 2024 12:13
atoi in Assembly - Convert a number string to a 64 bit integer.
global atoi
section .text
atoi:
mov rax, 0 ; Set initial total to 0
convert:
movzx rsi, byte [rdi] ; Get the current character
test rsi, rsi ; Check for \0