- Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
_(underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)0(zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
$(dollar) to move the cursor at the end of line (doesn't switch to insert mode)d$will delete from wherever your cursor is till the end of the linef<character>to move cursor to the first occurrence of<character>f(to move cursor to first occurence of(
t<character>to move cursor to upto but not on the first occurrence of<character>t(to move cursor to first occurence of(
I know there is a lot of confusion around Observables, Iterables, AsyncIterables and AsyncObservables. Let's try to break this down and the reasons for each.
When it comes to collections, you have two ways of thinking about collections, push versus pull. With pull, the consumer is in control of when you get the items, but with push, you get the values when the producer is ready.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Target state | |
| var tx = 0; | |
| var ty = 0; | |
| var scale = 1; | |
| function visualiseTargetState() { | |
| box.style.transform = `translate(${tx}px, ${ty}px) scale(${scale})`; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| /* | |
| // ########################################################################## */ | |
| // New cheat sheet for Bootstrap 5: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Box do | |
| defmacro __using__(_env) do | |
| quote do | |
| import Box | |
| end | |
| end | |
| @doc """ | |
| Define module with struct and typespec, in single line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| apt-get install -y curl unzip | |
| mkdir -p /var/lib/consul | |
| mkdir -p /usr/share/consul | |
| mkdir -p /etc/consul/conf.d | |
| curl -OL https://releases.hashicorp.com/consul/0.7.5/consul_0.7.5_linux_amd64.zip | |
| unzip consul_0.7.5_linux_amd64.zip | |
| mv consul /usr/local/bin/consul |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn max<T: PartialOrd + PartialEq>(a: T, b: T) -> T { | |
| if a < b { | |
| b | |
| } | |
| else { | |
| a | |
| } | |
| } | |
| fn main() { |
This gist is deprecated and now exists here
This article is intended to further your knowledge of the various phases a DOM event goes through.
Great resources to refer to:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.ramseyboy.function | |
| import java.util.* | |
| /** | |
| * A container object which may or may not contain a non-null value. If a value is defined, `isdefined()` will return `true` and `get()` will return the value. | |
| * | |
| * Additional methods that depend on the presence or absence of a contained value are provided, | |
| * such as [orElse()][.orElse] (return a default value if value not defined) |
NewerOlder