Skip to content

Instantly share code, notes, and snippets.

View svishwanath-tw's full-sized avatar

Suhas Vishwanath svishwanath-tw

View GitHub Profile
@svishwanath-tw
svishwanath-tw / gist:dc373815a6df01e3d417e48f138f09e9
Created February 16, 2020 17:04
Sample output from go crawler
~/Documents/code/play/crawler |master U:2 ✗|
→ go clean -x && go build && ./crawler
cd /Users/vhasus/Documents/code/play/crawler
rm -f crawler crawler.exe crawler.test crawler.test.exe caching_fetcher caching_fetcher.exe crawler crawler.exe fake_fetcher fake_fetcher.exe fetcher fetcher.exe log log.exe main main.exe
Crawl output:
found at https://golang.org/: "The Go Programming Language"
not found: https://golang.org/cmd/
found at https://golang.org/pkg/: "Packages"
found at https://golang.org/pkg/fmt/: "Package fmt"
found at https://golang.org/pkg/: "Packages"
diff --git a/detector/filecontent_detector.go b/detector/filecontent_detector.go
index 15e4d17..f1397b4 100644
--- a/detector/filecontent_detector.go
+++ b/detector/filecontent_detector.go
@@ -31,49 +31,10 @@ func (fc *FileContentDetector) AggressiveMode() *FileContentDetector {
return fc
}
-type contentType int
-
@svishwanath-tw
svishwanath-tw / gist:36e428713c51aad1adc4e43ce97e859d
Created October 25, 2018 21:58
sampleZapLumberJackIntegration.go
package main
import (
"fmt"
"time"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"gopkg.in/natefinch/lumberjack.v2"
)
#!/bin/bash
set -euo pipefail
function run() {
declare REPO_LIST_FILE
declare PRE_COMMIT_TALISMAN_CONFIG_FILE
declare DEBUG
#installing pre-commit tool
which pre-commit >/dev/null 2>&1 || (echo "Installing pre-commit tool" && brew install pre-commit && brew link sqlite3)

Keybase proof

I hereby claim:

  • I am svishwanath-tw on github.
  • I am svishwanath_tw (https://keybase.io/svishwanath_tw) on keybase.
  • I have a public key whose fingerprint is C768 923F FF81 BF0F 19E7 CA50 7721 28A7 ED3C C47C

To claim this, I am signing this object:

@svishwanath-tw
svishwanath-tw / install_talisman.sh
Last active October 22, 2018 10:51
A script to find an install talisman on all git repos on dev machine
#!/bin/bash
set -euo pipefail
shopt -s extglob
declare HOOK_SCRIPT
DEBUG=${DEBUG:-''}
FORCE_DOWNLOAD=${FORCE_DOWNLOAD:-''}
[[ $# -lt 1 ]] && set 'pre-commit'