Skip to content

Instantly share code, notes, and snippets.

View shivam-880's full-sized avatar
🔬

Shivam shivam-880

🔬
View GitHub Profile

SPEAKER ENGAGEMENT AGREEMENT V1.1

This Speaker Engagement Agreement ("Agreement") is made and entered into by and between ____________________ ("Speaker"), whose principal place of residence is __________________________________, and ____________________ ("Organizer"), whose primary mailing address is __________________________________, on ___________ ("Effective Date").

WHEREAS, the Speaker has knowledge, experience, and skills of interest to Organizer, and has been invited by the Organizer to present a talk at ____________________ ("Conference"), held on ___________ ("Conference Dates"); and

WHEREAS, the Organizer desires to have Speaker present a talk to an audience invited by Organizer, and the Speaker, to present this talk to said audience, and to other audiences across the Internet;

@luismts
luismts / GitCommitBestPractices.md
Last active November 14, 2024 08:28
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@Geoff-Ford
Geoff-Ford / master-javascript-interview.md
Last active October 15, 2024 11:51
Eric Elliott's Master the JavaScript Interview Series
package auth
import (
"context"
"net/http"
"strings"
"google.golang.org/grpc/metadata"
"github.com/andela/micro-api-gateway/pb/authorization"
@dcaoyuan
dcaoyuan / akka-http-client.scala
Created August 26, 2016 12:23
akka-http-client-example
val uri = "http://www.yahoo.com"
val reqEntity = Array[Byte]()
val respEntity = for {
request <- Marshal(reqEntity).to[RequestEntity]
response <- Http().singleRequest(HttpRequest(method = HttpMethods.POST, uri = uri, entity = request))
entity <- Unmarshal(response.entity).to[ByteString]
} yield entity
val payload = respEntity.andThen {
package com.timmeh.openhr.openholidays.model
import slick.driver.H2Driver.api._
import slick.lifted.{ProvenShape, ForeignKeyQuery}
// This file demonstrates how to map many columns into a nested case class using projections for each case class
class LargeTableExample1(tag: Tag)
extends Table[LargeTableRow](tag, "LARGE_TABLE") {
def idToD = (id, a, b, c, d)
def id = column[Int]("ID", O.PrimaryKey)
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active November 11, 2024 17:49
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

10 Scala One Liners to Impress Your Friends

Here are 10 one-liners which show the power of scala programming, impress your friends and woo women; ok, maybe not. However, these one liners are a good set of examples using functional programming and scala syntax you may not be familiar with. I feel there is no better way to learn than to see real examples.

Updated: June 17, 2011 - I'm amazed at the popularity of this post, glad everyone enjoyed it and to see it duplicated across so many languages. I've included some of the suggestions to shorten up some of my scala examples. Some I intentionally left longer as a way for explaining / understanding what the functions were doing, not necessarily to produce the shortest possible code; so I'll include both.

1. Multiple Each Item in a List by 2

The map function takes each element in the list and applies it to the corresponding function. In this example, we take each element and multiply it by 2. This will return a list of equivalent size, compare to o

@vasanthk
vasanthk / System Design.md
Last active November 14, 2024 11:31
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ejmr
ejmr / git-branch-show-description.sh
Last active October 6, 2024 13:44
Show the Description for the Current Branch
#!/bin/bash
#
# You can use `git branch --edit-description` to write a description
# for a branch, but Git provides no simple command to display that
# description. The "easiest" way to see it is via `git config --get
# branch.BRANCH_NAME.description`.
#
# This script automates that process and is meant to be used as
# a Git alias to provide a shorter command for showing the
# description of the current branch.