Skip to content

Instantly share code, notes, and snippets.

View abhijitSingh86's full-sized avatar

Abhijit Singh abhijitSingh86

View GitHub Profile
#!/bin/bash
# Step 1: Obtain a list of our personal hosts.
# Export from Bitwarden, LastPass, 1Password, or similar:
my_passwords.txt
# Next commands will assume the LastPass export format, which is CSV with the URL in the first field:
# url,username,password,[... more fields]
@abhijitSingh86
abhijitSingh86 / neo4j_cypher_cheatsheet.md
Created March 10, 2021 10:42 — forked from DaniSancas/neo4j_cypher_cheatsheet.md
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@abhijitSingh86
abhijitSingh86 / Story Shaping.md
Created September 2, 2020 11:17 — forked from framegrabber/Story Shaping.md
A rough write-up of how I approach "writing" user stories with teams

Story Shaping

How NOT to use it

  • Fill it in one go
  • Do it on your own
  • Hand over the “finished” story to the team without a proper walk-through 

Template (it’s not really a template, but anyway…)

Story Title (Jira calls this Summary)

@abhijitSingh86
abhijitSingh86 / gist:11b3710a2576cdd38fdde0457121ebea
Created July 28, 2020 10:38 — forked from runarorama/gist:a8fab38e473fafa0921d
Compositional application architecture with reasonably priced monads
sealed trait Interact[A]
case class Ask(prompt: String)
extends Interact[String]
case class Tell(msg: String)
extends Interact[Unit]
trait Monad[M[_]] {
def pure[A](a: A): M[A]

A Progressive Web Appplication uses modern web capabilities to deliver an app-like user experience, these applications are sometimes built as isomorphic web applications. In these cases, much of the code that runs on the client also runs the server.

This combination of approaches and the various technologies that make them possible are being used to build a new class of web applications that can often come together quicker and in many cases are indistinguishable from native applications.

So much so, thanks to Electron, you can often wrap these web applications as "native applications". These web-native applications look great too, if you use Slack or Visual Studio Code you know what I am talking about.

I believe Web Crypto is a great addition to this toolchain. With the Web Crypto these applications can incorporate strong,

@abhijitSingh86
abhijitSingh86 / LoggingMailbox.scala
Created July 24, 2019 10:03 — forked from patriknw/LoggingMailbox.scala
Logs the mailbox size when exceeding the configured limit. Implemented in Scala and Java. Copy one of them to your project and define the configuration. This code is licensed under the Apache 2 license.
/**
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.contrib.mailbox
import scala.concurrent.duration._
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicLong
import com.typesafe.config.Config
import akka.actor.{ ActorContext, ActorRef, ActorSystem, ExtendedActorSystem }

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

package challenge
// libraryDependencies += "org.scalaz" %% "scalaz-zio" % "0.11"
import com.softwaremill.quicklens._
// libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11"
import scalaz.zio._
import scalaz.zio.syntax._
import cats.effect.ExitCase._
import cats.effect.Sync
import cats.effect.concurrent.Ref
import cats.syntax.flatMap._
import cats.syntax.functor._
trait Tap[F[_]] {
def apply[A](effect: F[A]): F[A]
}
import sbt.Keys._
import sbt._
import sbtdocker.DockerPlugin.autoImport._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
lazy val resolversSettings = ...
lazy val versions = ...
lazy val dependenciesSettings = ...