Skip to content

Instantly share code, notes, and snippets.

View ad's full-sized avatar
💎
danielapatin.ton

Daniel Apatin ad

💎
danielapatin.ton
View GitHub Profile
@cmod
cmod / hugofastsearch.md
Last active September 10, 2024 11:20 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@enricofoltran
enricofoltran / main.go
Last active October 3, 2024 14:08
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@pteich
pteich / main.go
Last active May 30, 2024 02:57
Example for using go's sync.errgroup together with signal detection signal.NotifyContext to stop all running goroutines
package main
import (
"context"
"errors"
"fmt"
"os/signal"
"syscall"
"time"
@katopz
katopz / GetRepositoryIssues.gql
Last active April 25, 2018 14:02
GraphQL Github Example
// Try at : https://graphql-explorer.githubapp.com/
// With query variables below
// {"name": "react", "login": "facebook", "states": "CLOSED"}
query GetRepositoryIssues($states: [IssueState!], $name: String!, $login: String!) {
repositoryOwner(login: $login) {
repository(name: $name) {
issues(last: 10, states: $states) {
edges {
node {
title
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class