Skip to content

Instantly share code, notes, and snippets.

View ashee's full-sized avatar

Amitava Shee ashee

View GitHub Profile
@ashee
ashee / go-debug-dlv.md
Last active January 5, 2022 20:07
go debugging in Apple M1

Issue

dlv errors out

$ ~/go/bin/dlv debug ./fdbgrok 
could not launch process: stub exited while waiting for connection: exit status 0

Go env

go env 
@ashee
ashee / vi-not-vim-cmds.md
Last active August 19, 2021 19:10
vi-not-vim-cmds
@ashee
ashee / readline_zle_key_shortc
Created July 15, 2021 11:15
readline zle key shortcuts
# useful key shortcuts in bash readline or zle
"^X^V" vi-cmd-mode
"^X^U" undo
"^X^B" vi-match-bracket
"^X^E" edit-command-line
"^X^F" vi-find-next-char
"^X^J" vi-join
"^X^K" kill-buffer
"^@" set-mark-command
"^X^X" exchange-point-and-mark
@ashee
ashee / 1 - qemu commands
Created January 31, 2021 11:12 — forked from aserhat/0 - setup
QEMU and HVF
#Static Builds
## Creata disk
qemu-img create -f qcow2 server1.img 10G
## Install the OS onto the disk
qemu-system-x86_64 -M accel=hvf --cpu host -hda server1.img -cdrom ubuntu-18.04.2-live-server-amd64.iso -boot d -m 2048
## Boot the server
qemu-system-x86_64 -M accel=hvf --cpu host server1.img -m 2048
#!/usr/bin/env python
import dask.bag as db
import json
from boto3.dynamodb.types import TypeDeserializer
def load_json(data):
doc = json.loads(data)
items = doc['Items']
d = TypeDeserializer()
#!/bin/bash
// 2>/dev/null; OPTS="-cp $(cat cp.txt)"
// 2>/dev/null; exec groovy $OPTS "$0" "$@"; exit $?
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.*;
import software.amazon.awssdk.services.s3.model.*;
((ch.qos.logback.classic.Logger) org.slf4j.LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME)).setLevel(ch.qos.logback.classic.Level.WARN)
@ashee
ashee / application.properties
Last active April 24, 2018 12:50
netty webclient debug log
# see - https://stackoverflow.com/questions/36938064/how-do-i-debug-resttemplate-using-logback-in-spring-boot
logging.level.reactor.ipc.netty.channel.ContextHandler=debug
logging.level.reactor.ipc.netty.http.client.HttpClient=debug
@ashee
ashee / install_openresty_in_mac.md
Last active February 17, 2018 04:48 — forked from ejlp12/install_openresty_in_mac.md
Install openresty in Mac OS-X

Install 3scale self managed API gateway (openresty) in Mac OS-X

brew update
brew install pcre openssl

wget http://openresty.org/download/ngx_openresty-1.9.7.2.tar.gz
tar xzvf ngx_openresty-1.9.7.2.tar.gz
cd ngx_openresty-1.9.7.2
@ashee
ashee / kong-k8s-hosts-ports.md
Last active February 9, 2018 00:31
kong host and ports

NOTES:

  1. Kong Admin can be accessed inside the cluster using: DNS=api-kong-admin.default.svc.cluster.local PORT=8444

To connect from outside the K8s cluster:

     HOST=$(kubectl get nodes --namespace default -o jsonpath='{.items[0].status.addresses[0].address}')
 PORT=$(kubectl get svc --namespace default api-kong-admin -o jsonpath='{.spec.ports[0].nodePort}')
@ashee
ashee / jenkins-sbt.md
Created November 10, 2017 12:58
jenkins-sbt

Advanced Refspec

origin +refs/heads/:refs/remotes/origin/

Branch specifier

empty

Build -> Build using SBT

sbt Flags: -Dsbt.log.noformat=true