Skip to content

Instantly share code, notes, and snippets.

@pwntester
pwntester / lgtm.js
Last active September 30, 2021 21:19
Browser UserScript to show Project Star count for each LGTM result
// ==UserScript==
// @name LGTM stars
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Show star counts
// @author Alvaro Muñoz (@pwntester)
// @match https://lgtm.com/query/*
// @grant none
// @run-at document-idle
// ==/UserScript==
@codref
codref / go-ssh-reverse-tunnel.go
Last active January 22, 2025 16:31
Go SSH reverse tunnel implementation (SSH -R)
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
// junkterm is a quick and dirty serial terminal.
package main
import (
"io"
"log"
"os"
"github.com/pkg/term"
"github.com/spf13/cobra"
@jzelinskie
jzelinskie / client.go
Last active October 27, 2021 03:37
grpc bidirectional streams in golang
package main
import (
"log"
"time"
"golang.org/x/net/context"
"google.golang.org/grpc"
pb "github.com/jzelinskie/grpc/simple"
96: FBProfileSetEventsCalendarSubscriptionStatusMutationOptimisticPayloadFactoryProtocol-Protocol.h
95: FBGroupUpdateRequestToJoinSubscriptionLevelMutationOptimisticPayloadFactoryProtocol-Protocol.h
94: FBEventUpdateNotificationSubscriptionLevelMutationOptimisticPayloadFactoryProtocol-Protocol.h
93: FBReactionUnitUserSettingsDisableUnitTypeMutationOptimisticPayloadFactoryProtocol-Protocol.h
93: FBMemReactionAcornSportsContentSettingsSetShouldNotPushNotificationsResponsePayloadBuilder.h
92: FBReactionUnitUserSettingsEnableUnitTypeMutationOptimisticPayloadFactoryProtocol-Protocol.h
91: FBProfileUpdateSecondarySubscribeStatusMutationOptimisticPayloadFactoryProtocol-Protocol.h
91: FBViewerNotificationsUpdateAllSeenStateMutationOptimisticPayloadFactoryProtocol-Protocol.h
90: FBMemReactionAcornSportsContentSettingsSetShouldPushNotificationsResponsePayloadBuilder.h
89: FBMemReactionAcornTvContentSettingsSetShouldNotPushNotificationsResponsePayloadBuilder.h
@mcastilho
mcastilho / gist:e051898d129b44e2f502
Last active June 23, 2023 18:33
Cheap MapReduce in Go
package main
import (
"bufio"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
@harlow
harlow / golang_job_queue.md
Last active March 29, 2025 04:55
Job queues in Golang
@whyrusleeping
whyrusleeping / gob.go
Created October 16, 2014 06:07
golang gob interface example
package main
import (
"bytes"
"encoding/gob"
"fmt"
)
type MyFace interface {
A()
@kachayev
kachayev / concurrency-in-go.md
Last active January 6, 2025 22:43
Channels Are Not Enough or Why Pipelining Is Not That Easy
@icecrime
icecrime / gist:67399480c9a10b48fadc
Last active November 7, 2023 08:38
An experiment with Golang reflection and channels
package main
import (
"reflect"
"strings"
)
func makeChannel(t reflect.Type, chanDir reflect.ChanDir, buffer int) reflect.Value {
ctype := reflect.ChanOf(chanDir, t)
return reflect.MakeChan(ctype, buffer)