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
// 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
@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
@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"
@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"
@cmod
cmod / hugofastsearch.md
Last active November 18, 2024 19:56 — 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