Skip to content

Instantly share code, notes, and snippets.

View spuranam's full-sized avatar

Satish Puranam spuranam

  • Ford Motor Company
  • Michigan
View GitHub Profile
@spuranam
spuranam / stopmediumpaywall.txt
Created July 14, 2023 02:52 — forked from kamysheblid/stopmediumpaywall.txt
Bypass the annoying paywall on Medium.com and DataScience.com
// ==UserScript==
// @name Stop the Medium The Pay Wall
// @namespace StopThePayWall
// @version 1
// @include *medium*
// @include *datascience*
// ==/UserScript==
async function abc () {
var resp = (await fetch(location, { "credentials": "omit", "headers": { "Accept": "text/html,text/xhtml,text/xml,*/*", "Connection": "keep-alive", }, "method": "GET", "mode": "cors" }));
@spuranam
spuranam / gcp-machineset.yaml
Created April 28, 2022 21:10 — forked from aravindhp/gcp-machineset.yaml
gcp-machineset
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: aravindh-winc-6h9df
name: aravindh-winc-6h9df-windows-worker-a
namespace: openshift-machine-api
spec:
replicas: 1
selector:
@rsc
rsc / buildall
Last active August 29, 2015 14:14
rebuild and compare all Go targets
#!/bin/bash
# Usage: buildall [-e] [-cmp] [-work]
#
# Builds everything (std) for every GOOS/GOARCH combination but installs nothing.
#
# By default, runs the builds with -toolexec 'toolstash -cmp', to test that the
# toolchain is producing bit identical output to a previous known good toolchain.
#
# Options:
@mrcrilly
mrcrilly / gcm_enc.go
Last active August 29, 2015 14:09
Simple GCM Encryption in Go
package main
// Core
import (
"fmt"
"io"
// Crypto, core
"crypto/aes"
"crypto/cipher"
@bketelsen
bketelsen / nsqadmin-service.json
Last active March 20, 2024 07:10
This gist represents all the manifests you'll need to run a redundant and fault-tolerant NSQ cluster on Kubernetes. NSQ Admin's http interface is available on port 14171 on any node. There's an issue with NSQ Admin if you're running more than one lookupd service, so I recommend running just one lookupd until I figure it out.
{
"id": "nsqadmin-http",
"kind": "Service",
"apiVersion": "v1beta1",
"port": 14171,
"protocol": "TCP",
"selector": { "name": "nsqadmin" }
}
@mholt
mholt / interface_spider.go
Created August 4, 2014 23:04
Crawls golang.org/pkg for interfaces and writes them to a file.
package main
import (
"log"
"os"
"strings"
gq "github.com/PuerkitoBio/goquery"
)
@cryptix
cryptix / client.go
Created June 22, 2014 11:09
multipart upload with io.Pipe
package main
import (
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"runtime"
@michaelsbradleyjr
michaelsbradleyjr / passnhash.bash
Last active August 29, 2015 14:02
password and hash generation with apg, htpasswd/bcrypt
#!/bin/bash
# password and hash pair generation with apg, htpasswd/bcrypt
# example usage:
# source this file or include the passnhash function in your .bash_profile/.bashrc
# then: `passnhash 0 35 14`
# prerequisites:
# 1) recent version of htpasswd that supports bcrypt (-B flag)
# deb: `apt-get install apache2-utils`
package main
import (
"bufio"
"fmt"
"log"
"os"
"runtime"
)
package main
import (
"log"
"net"
"os"
"os/user"
"code.google.com/p/go.crypto/ssh"
"code.google.com/p/go.crypto/ssh/agent"