Skip to content

Instantly share code, notes, and snippets.

FROM golang:1.7
# Install glide
RUN curl https://glide.sh/get | sh
RUN mkdir -p /go/src/github.com/App
COPY . /go/src/github.com/App
WORKDIR /go/src/github.com/App
# Install go packages
FROM nidhi11594/node-go:latest
# Install glide
RUN curl https://glide.sh/get | sh
RUN mkdir -p /go/src/github.com/App
COPY . /go/src/github.com/App
WORKDIR /go/src/github.com/App
# Install node packages
@nidhi-ag
nidhi-ag / ssdb_priority_queue.go
Last active January 15, 2018 12:15
Use ssdb as priority queue in GO
import (
"github.com/ssdb/gossdb/ssdb"
"strconv"
"time"
)
var priorityQueue *ssdb.Client
func pushToQueue() {
key := "xyz" // Some unique key
FROM golang:1.8.5-stretch
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
dpkg-dev \
file \
@nidhi-ag
nidhi-ag / xhprof-php7
Created February 3, 2019 07:14
Install XHProf - PHP7
git clone https://github.com/longxinH/xhprof.git ./xhprof
cd xhprof/extension/
phpize
./configure --with-php-config=/usr/local/bin/php-config
make
sudo make install
package main
import (
"fmt"
"encoding/json"
)
func maxHeap (input []int) {
l := len(input)
@nidhi-ag
nidhi-ag / golang - priority queue using heap
Created July 16, 2019 16:29
Implementation of priority queue using heap data structure (without using golang heap interface)
package main
import (
"encoding/json"
"fmt"
)
type Queue []int
var n int
@nidhi-ag
nidhi-ag / docker_notes.txt
Created August 4, 2019 06:46 — forked from sd031/docker_notes.txt
Detailed Docker notes from Docker Deep dive course
Course url: https://linuxacademy.com/containers/training/course/name/docker-deep-dive-part-1
==================== All Docker Command While Learning Docker =========================
Get a list of all of the Docker commands:
docker -h
====== Attaching to Container , run in background , name it ==========
Create a container and attach to it:
@nidhi-ag
nidhi-ag / docker-help.md
Last active December 17, 2019 10:23 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

These are the 4 changes required to generate core dump
1. Run docker container in privileged mode
2. Add CoreDumpDirectory /tmp in apache2.conf
3. Set core pattern
echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
4. Set core files to unlimited
ulimit -c unlimited