stash clear/drop

clear

Remove all the stash entries. Note that those entries will then be subject to pruning, and may be impossible to recover (see Examples below for a possible strategy).

drop [-q|--quiet] [<stash>]

Remove a single stash entry from the list of stash entries. When no <stash> is given, it removes the latest one. i.e. stash@{0}, otherwise <stash> must be a valid stash log reference of the form stash@{<revision>}.

https://git-scm.com/docs/git-stash

Shared by joubin on Mon Jul 09 2018

The 'where' Windows command

Use the where command.

WHERE [/R dir] [/Q] [/F] [/T] pattern...

By default, the search is done along the current directory and in the paths specified by the PATH environment variable.

Parameter List:
/R Recursive

/Q Quiet mode

/F Displays the matched filename in double quotes.

/T Displays the file size, last modified date and time for all
matched files.

Shared by joubin on Mon May 28 2018

Dockerfile

Docker can build images automatically by reading the instructions from a Dockerfile.

Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

Using docker build users can create an automated build that executes several command-line instructions in succession.

https://docs.docker.com/engine/reference/builder/

Shared by joubin on Tue May 29 2018


Html submit button formaction attribute

The formaction attribute specifies where to send the form-data when a form is submitted.

This attribute overrides the form's action attribute.

The formaction attribute is only used for buttons with type="submit".

The formaction attribute is new in HTML5.

https://www.w3schools.com/tags/att_button_formaction.asp

Shared by joubin on Tue May 08 2018

Visual Studio Code shortcuts

Ctrl + Shift + P => Command Palette

Ctrl + Shift + X => Extenstions

Ctrl + ` => Integrated Terminal (? Ctrl + J)

Ctrl + B => Toggle Sidebar (right)

Alt + Left Arrow Key => Previous cursor location

Alt + Right Arrow Key => Next cursor location

Ctrl + P => Go to file

F12 => Go to definition

Ctrl + F12 => Go to Implmentation

Ctrl + K, S => Save All





Shared by joubin on Tue May 08 2018

PowerShell and TLS1.2

PowerShell user TLS1.0 by default and if you try Invoke-RestMethod to an HTTPS endpoint, you will get:

Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send

To force PS to use TLS1.2, execute the following:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

https://www.codyhosterman.com/2016/06/force-the-invoke-restmethod-powershell-cmdlet-to-use-tls-1-2/

Shared by joubin on Fri May 04 2018

TSQL, Composite Primary Key

Alter table TABLENAME 
Add Constraint PK_COL1_COL2_COL3
Primary Key Clustered (COL1, COL2, COL3)

Shared by joubin on Wed May 02 2018

Emmet

Emmet is a set of plug-ins for text editors that allow for high-speed coding and editing in HTML, XML, XSL, and other structured code formats via content assist.

Formerly known as Zen Coding.

Emmet is primarily independent from any text editor, as the engine works directly with text rather than with any particular software.

Reference: https://en.wikipedia.org/wiki/Emmet_(software)

Project site: https://emmet.io/

Shared by joubin on Wed May 02 2018

Kubernetes Architecture Overview









Shared by joubin on Mon Feb 19 2018

cgroups

cgroups is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes.

Engineers at Google (primarily Paul Menage and Rohit Seth) started the work on this feature in 2006 under the name "process containers".

In late 2007, the nomenclature changed to "control groups" to avoid confusion caused by multiple meanings of the term "container" in the Linux kernel context, and the control groups functionality was merged into the Linux kernel mainline in kernel version 2.6.24, which was released in January 2008. Since then, developers have added many new features and controllers, such as support for kernfs in 2014, firewalling, and unified hierarchy.

Shared by joubin on Sun Apr 29 2018

EAV Model

The Entity-Attribute-Value model or EAV is also sometimes referred to at the Object-Attribute-Value Model, or even the Open Schema.

This is a data model that is often used in instances where the amount of attributes, properties, or parameters that can be used to define an entity are potentially limitless.

Attributes are defined disconnected from entities. The values table link back to the attribute and the entity itself.

http://www.learn.geekinterview.com/it/data-modeling/entity-attribute-value-eav.html

Shared by joubin on Fri Jan 26 2018

Browser Service Worker

A service worker is a script that your browser runs in the background, separate from a web page.

They don't need a web page or user interaction.

Examples of background tasks are:

  • Push Notifications
  • Background Sync

The reason this is such an exciting API is that it allows you to support offline experiences.

https://developers.google.com/web/fundamentals/primers/service-workers/

https://developers.google.com/web/ilt/pwa/introduction-to-service-worker

Shared by joubin on Tue Apr 17 2018

Manifest file

A manifest file, in computing, is a file containing metadata for a group of accompanying files that are part of a set or coherent unit.

For example, an executable binary file of a computer program may have a manifest describing the name, version number, license and the constituting files of the program.

The term is borrowed from a cargo shipping procedure, where a ship manifest would list the crew and/or cargo of a vessel.

https://en.wikipedia.org/wiki/Manifest_file

Shared by joubin on Mon Apr 16 2018

Cognitive Scale Cortex

CognitiveScale Cortex 5 simplifies design, development, delivery, and management of enterprise-grade AI systems that weave knowledge and learning across the enterprise—from front office to back office to mission critical core functions.

https://medium.com/fast-company/this-is-the-worlds-first-graphical-ai-interface-75cc11202168

https://www.cognitivescale.com/products/

Shared by joubin on Sun Apr 08 2018

Docker swarm mode

Swarm mode refers to cluster management and orchestration features embedded in Docker Engine. When you initialize a new swarm (cluster) or join nodes to a swarm, the Docker Engine runs in swarm mode.

https://docs.docker.com/glossary/?term=swarm%20mode

Shared by joubin on Fri Jan 12 2018

Kubernetes vs Docker Swarm

Kubernetes is a full-fledged container orchestration system that includes a scheduler, health checks, rolling upgrades, autoscaling, etc. whereas Docker Swarm is mainly about providing a cluster-wide view of a single Docker engine.

https://www.quora.com/What-are-the-pros-and-cons-of-Google-Kubernetes-vs-Docker-Swarm

Shared by joubin on Fri Jan 12 2018

Compiler parts

Every Compiler has two parts:

1. Front end (lexical analysis, parsing)

1.5 Optimizer (Optimizing abstract syntax tree)

2. Back end (machine code generation)

Front end (e.g. Clang) takes the source code and generates abstract syntax tree (LLVM IR).

Optimizer takes the LLVM IR and generates more optimized code using dead code elimination, constant propagation and other techniques ( Optimizing compiler ).

The back end takes optimzed IR and generates machine code specific to CPU ( X86, PowerPC, ARM ).





Shared by joubin on Tue Mar 06 2018

Blue-Green Deployment

The Blue-Green Deployment is a technique for releasing your application in a predictable manner with the goal of reducing any downtime associated with a release.

The point is that at any given time, only one version of the application is serving client.

Contrast this with rolling-updates type of deployment.

It’s a quick way to prime your app before releasing, and also quickly roll back if you find issues.

http://blog.christianposta.com/deploy/blue-green-deployments-a-b-testing-and-canary-releases/

Shared by joubin on Sat Feb 03 2018

Kubernetes (K8s)

Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure.

https://kubernetes.io/docs/whatisk8s/

Shared by joubin on Tue Feb 21 2017