Skip to content

Instantly share code, notes, and snippets.

View nanikjava's full-sized avatar

Nanik nanikjava

View GitHub Profile
@nanikjava
nanikjava / gist:37453d535923813c93a2e89e9652a09c
Last active July 13, 2021 23:23
Testing Ory Kratos API call using curl
Following are notes for Ory Kratos contribution
-----------------------------------------------
1) Following are curl commands to use to test user and registration endpoint
## Register User
flow=$(curl -s -X GET \
-H "Accept: application/json" \
http://127.0.0.1:4433/self-service/registration/api | jq -r '.id' )
GOROOT=/home/nanik/Golang/go1.13.7.linux-amd64/go #gosetup
GOPATH=/home/nanik/Downloads/temp/packages #gosetup
/home/nanik/Golang/go1.13.7.linux-amd64/go/bin/go build -o /tmp/___faasd_up github.com/openfaas/faasd #gosetup
/tmp/___faasd_up up #gosetup
2020/02/23 09:19:28 File exists: "/var/lib/faasd/secrets/basic-auth-password"
2020/02/23 09:19:28 File exists: "/var/lib/faasd/secrets/basic-auth-user"
2020/02/23 09:19:28 Writing network config...
2020/02/23 09:19:28 Supervisor created in: 446.858µs
2020/02/23 09:19:28 Need to kill basic-auth-plugin
Preparing: basic-auth-plugin with image: docker.io/openfaas/basic-auth-plugin:0.18.10
@nanikjava
nanikjava / gist:71ef16e6558253a082f466803fd5b9d9
Created November 8, 2019 03:22
kube-bench running on minikube master (tested 8/nov/2019)
I1108 03:08:42.805732 12782 common.go:293] Checking if the current node is running master components
I1108 03:08:42.813083 12782 util.go:115] Component apiserver uses running binary kube-apiserver
I1108 03:08:42.818166 12782 util.go:115] Component scheduler uses running binary kube-scheduler
I1108 03:08:42.823422 12782 util.go:53] [/bin/ps -C kube-controller-manager -o cmd --no-headers]: exit status 1
I1108 03:08:42.823507 12782 util.go:239] executable 'kube-controller-manager' not running
I1108 03:08:42.828809 12782 util.go:115] Component controllermanager uses running binary kube-controller
I1108 03:08:42.834563 12782 util.go:115] Component etcd uses running binary etcd
I1108 03:08:42.839398 12782 util.go:53] [/bin/ps -C flanneld -o cmd --no-headers]: exit status 1
I1108 03:08:42.839434 12782 util.go:239] executable 'flanneld' not running
I1108 03:08:42.839446 12782 util.go:113] Component flanneld not running
@nanikjava
nanikjava / minikube.txt
Last active January 28, 2019 02:18
Compilation of Minikube (bare-metal Kubernetes) from source code (master branch) 28-Jan-2019
---------
| Notes |
---------
* Machine running fresh installation of Ubuntu 16.04.5 LTS (server).
* Commands used
* sudo apt-get install golang build-essential virtualbox
* Install docker
* curl -fsSL https://get.docker.com -o get-docker.sh
* sudo sh get-docker.sh
* sudo groupadd docker
1) Download the kernel and rootfs from the link provided in this website https://asteroidos.org/wiki/emulator/
2) Follow the instruction on this website https://at.projects.genivi.org/wiki/display/GDP/QEMU+with+hardware+graphics+acceleration#QEMUwithhardwaregraphicsacceleration-Compiling for compiling QEMU
3) On successful compilation of QEMU use the following command to run
$YOUR_QEMU_DIRECTORY/x86_64-softmmu/qemu-system-x86_64 -enable-kvm -kernel bzImage-qemux86.bin -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::2222-:22 -drive format=raw,file=asteroid-image-qemux86.ext4 -m 512 -display sdl,gl=on --append "quiet root=/dev/hda rw mem=512M video=800x800"
building golang
----------------
* download go1.4 as bootstrap and put it somewhere
* put go1.4 directory into GOROOT_BOOTSTRAP like follows
export GOROOT_BOOTSTRAP="/media/nanik/SeagateExpansionDrive/OpenSourceProject/Docker/go14"
* go inside src directory and use the following command
nanik : ~/Work/robherring/linux$ make defconfig distro.config
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'x86_64_defconfig'
#
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal
aclocal: warning: couldn't open directory 'build-aux': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: running: libtoolize --copy
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `build-aux'.
@nanikjava
nanikjava / gist:e10edde741927fd7d826
Created February 3, 2016 23:05
virglrenderer error
nanik : ~/Work/robherring/virglrenderer$ make
git.mk: Generating .gitignore
make all-recursive
make[1]: Entering directory `/home/nanik/Work/robherring/virglrenderer'
Making all in src
make[2]: Entering directory `/home/nanik/Work/robherring/virglrenderer/src'
Making all in gallium/auxiliary
make[3]: Entering directory `/home/nanik/Work/robherring/virglrenderer/src/gallium/auxiliary'
CC cso_cache/cso_cache.lo
CC cso_cache/cso_hash.lo
@nanikjava
nanikjava / gist:75581c22cfac5c3c859b
Created November 12, 2015 05:16
brillo - mount
/dev/root on / type ext4 (ro,seclabel,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,seclabel,relatime,size=513536k,nr_inodes=128384,mode=755)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)