All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
This file contains 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
const dataTransfer = new DataTransfer() | |
cy.window().then((win) => { | |
cy.get('.dragButton') | |
.trigger('mousedown', { which: 1, view: win, force: true }) | |
cy.get('.dragButton') | |
.trigger('dragstart', { dataTransfer, view: win, force: true }) | |
.trigger('drag', { dataTransfer, view: win, force: true }) | |
cy.get('.dropElement') | |
.trigger('mouseenter', { force: true, view: win }) |
see how a minor change to your commit message style can make you a better programmer self generate {docs,changelog}, add context to the changeset, enable filtering (e.g. ignore styling or documentation changes), and liven up the commit history!
format: <type>(<scope>): <ticket> subject :emoji:
<scope>
- optional
- some changes are global or difficult to assign to a single component
- ``
This file contains 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
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
This file contains 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
// Уникальный массив | |
const numbers = [1, 2, 1, 1, 2, 1, 3, 4, 1 ] | |
const uniq = [...new Set(numbers)] // => [ 1, 2, 3, 4 ] | |
const uniq2 = Array.from(new Set(numbers)) // => [ 1, 2, 3, 4 ] | |
// Обновление объекта в массиве по свойству | |
const initial = [ {id: 1, score: 1}, {id: 2, score: 2}, {id: 3, score: 4}] | |
const newValue = {id: 3, score: 3} | |
const updated = initial.map(x => x.id === newValue.id ? newValue : x) |
This file contains 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
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'fileSize' | |
}) | |
export class FileSizePipe implements PipeTransform { | |
private units = [ | |
'bytes', | |
'KB', |
This file contains 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
# pull the official mongo docker container | |
docker pull mongo | |
# create network | |
docker network create my-mongo-cluster | |
# create mongos | |
docker run -d --net my-mongo-cluster -p 27017:27017 --name mongo1 mongo mongod --replSet my-mongo-set --port 27017 | |
docker run -d --net my-mongo-cluster -p 27018:27018 --name mongo2 mongo mongod --replSet my-mongo-set --port 27018 | |
docker run -d --net my-mongo-cluster -p 27019:27019 --name mongo3 mongo mongod --replSet my-mongo-set --port 27019 |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>MiniCodepenClone</title> | |
<style> | |
body,textarea,iframe{ margin:0; box-sizing:border-box; } | |
textarea,iframe { width:100%; height:50vh; float:left; } | |
textarea { color:#eee; background:#111; font-family:monospace; font-size:11pt; line-height:1.4; width:33.33%; } | |
#shareBtn { position:absolute; bottom:0; left:0; } |
#Git notes
Warning : Support for isplay of git notes has been dropped by github : https://github.com/blog/707-git-notes-display
Resource : https://vimeo.com/34273537
##Add
git notes add
NewerOlder