Skip to content

Instantly share code, notes, and snippets.

View rabingaire's full-sized avatar
🇳🇵
Let everything happen

rabin rabingaire

🇳🇵
Let everything happen
View GitHub Profile
let myInfo = {
name: 'Rabin Gaire',
age: 12,
address: 'Gulmi, Nepal'
};
let updatedInfo = { age: 21, address: 'Kathmandu, Nepal', ...myInfo};
console.log(updatedInfo);
console.log(myInfo);
let myInfo = {
name: 'Rabin Gaire',
age: 12,
address: 'Gulmi, Nepal'
};
let updatedInfo = {...myInfo, age: 21, address: 'Kathmandu, Nepal'};
console.log(updatedInfo); // { name: 'Rabin Gaire', age: 21, address: 'Kathmandu, Nepal' }
console.log(myInfo); // { name: 'Rabin Gaire', age: 12, address: 'Gulmi, Nepal' }
let myInfo = {
name: 'Rabin Gaire',
age: 12,
address: 'Gulmi, Nepal'
};
let updatedInfo = myInfo;
updatedInfo.age = 21;
updatedInfo.address = 'Kathmandu Nepal';
let myInfo = {
name: 'Rabin Gaire',
age: 12,
address: 'Gulmi, Nepal'
};
let updatedInfo = Object.assign({}, myInfo);
updatedInfo.age = 21;
updatedInfo.address = 'Kathmandu Nepal';
@rabingaire
rabingaire / main.go
Created August 23, 2019 06:59
CSV Extractor: Reads CSV file and creates a sub CSV file given start row and end row
package main
import (
"encoding/csv"
"log"
"os"
"strconv"
)
func main() {
@rabingaire
rabingaire / main.go
Created August 23, 2019 11:48
text2go: Converts .txt file to .go file
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
)
func main() {
@rabingaire
rabingaire / lldb-sourcekit.log
Created August 28, 2019 17:38
lldb-sourcekit log
AOCRT::NPI: Found all the non-indexed ISA masks
AOCRT::NPI: Found all the indexed ISA masks
SwiftASTContextForExpressions::SetTriple("x86_64h-apple-macosx") setting to "x86_64-apple-macosx10.14.4"
SwiftASTContextForExpressions::CreateInstance(Target)
SwiftASTContext("dyld")::SetTriple("x86_64-apple-macosx10.14.0") setting to "x86_64-apple-macosx10.14.0"
SwiftASTContext("libcache.dylib")::SetTriple("x86_64-apple-macosx10.14.0") setting to "x86_64-apple-macosx10.14.0"
SwiftASTContext("repl_swift")::SetTriple("x86_64-apple-macosx10.14.4") setting to "x86_64-apple-macosx10.14.4"
SwiftASTContext("repl_swift")::SetTriple("x86_64-apple-macosx10.14.4") setting to "x86_64-apple-macosx10.14.4"
SwiftASTContext("libSystem.B.dylib")::SetTriple("x86_64-apple-macosx10.14.0") setting to "x86_64-apple-macosx10.14.0"
SwiftASTContext("libSystem.B.dylib")::SetTriple("x86_64-apple-macosx10.14.0") setting to "x86_64-apple-macosx10.14.0"
package rabbitmq
import "github.com/streadway/amqp"
// Config parameters for queue service
type Config struct {
URL string
Exchange string
QueueName string
RoutingKey string
package rabbitmq
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
// Define the custom testify suite
FROM golang:alpine
RUN apk add --no-cache make curl gcc libc-dev
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .