Skip to content

Instantly share code, notes, and snippets.

View prachikhadke's full-sized avatar
🐽
The six honest serving-men: What, Why, When, How, Where and Who.

Prachi prachikhadke

🐽
The six honest serving-men: What, Why, When, How, Where and Who.
View GitHub Profile
@prachikhadke
prachikhadke / sparse_clones.md
Last active December 5, 2022 04:31 — forked from hofnerb/sparse_clones.md
Make sparse clone
git init <repo>
cd <repo>
git remote add -f origin <url>

This creates an empty repository with your remote, and fetches all objects but doesn't check them out. Then do:

git config core.sparseCheckout true
@prachikhadke
prachikhadke / nested-goroutines
Created May 7, 2020 00:05
Calling go routines from go routines
package main
import (
"fmt"
"time"
)
func SayHello(name string) {
fmt.Printf("Hello %s!\n", name)
}
GRANT USAGE ON SCHEMA public TO readwrite;
GRANT SELECT ON ALL TABLES IN SCHEMA public To readwrite;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readwrite;
GRANT USAGE ON SCHEMA schema_name TO readwrite;
GRANT SELECT ON ALL TABLES IN SCHEMA schema_name To readwrite;
ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name GRANT SELECT ON TABLES TO readwrite;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA schema_name TO readwrite;
GRANT SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA schema_name TO readwrite;
@prachikhadke
prachikhadke / .kitchen.yml
Last active November 17, 2017 21:24
kitchen yml file
---
driver:
name: vagrant
provisioner:
name: chef_zero
verifier:
name: inspec
@prachikhadke
prachikhadke / test kitchen logs
Last active November 17, 2017 21:24
test kitchen logs
op-chef pskhadke$ kitchen test
-----> Starting Kitchen (v1.19.0)
-----> Cleaning up any prior instances of <default-centos-74>
-----> Destroying <default-centos-74>...
Finished destroying <default-centos-74> (0m0.00s).
-----> Testing <default-centos-74>
-----> Creating <default-centos-74>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-7.4'...
==> default: Matching MAC address for NAT networking...
node {
properties([
parameters([
string(name: 'DEPLOY_ENV', defaultValue: 'TESTING', description: 'The target environment', )
])
])
stage("Initialize") {
echo "echo ${params.DEPLOY_ENV}"
}
pipeline {
agent any
parameters {
booleanParam(name: 'isFlag')
}
stages {
stage("Initialize") {
steps {