Skip to content

Instantly share code, notes, and snippets.

View olekstomek's full-sized avatar

Tomasz Oleksik olekstomek

View GitHub Profile

06.06.2020, Capgemini DevHours - Docker w praktyce

  • przed warsztatami upewnij się, że:
    • masz zainstalowanego i działającego (!) Dockera
      • sprawdź to za pomocą docker version lub docker container ls
  • Dobrze byłoby również mieć:
    • zainstalowanego git'a
    • jakiś edytor tekstu (polecane: VSCode)
GlauberF / KeyEventSimulator.js
Created April 29, 2020 10:28
A function for simulating key event in JavaScript. You just have to choose what key and keyboard event you want to simulate.
* Simulate a key event.
* @param {Number} keyCode The keyCode of the key to simulate
* @param {String} type (optional) The type of event : down, up or press. The default is down
* @param {Object} modifiers (optional) An object which contains modifiers keys { ctrlKey: true, altKey: false, ...}
function simulateKey (keyCode, type, modifiers) {
var evtName = (typeof(type) === "string") ? "key" + type : "keydown";
var modifier = (typeof(modifiers) === "object") ? modifier : {};
johnnyopao /
Created May 2, 2018 23:42
GPG Encrypt all files in directory
# This uses gpg to encrypt every file in a directory as separate
# encrypted files
# Usage
# ./ ./dir-of-files-to-encrypt "PASSPHRASE"
chajr /
Last active May 30, 2020 15:02
Polecenia GIT

Zbiór komend przeniesiony

Zbiór przeniesiony z gist do jednego repo w celu łatwiejszego zarządzania.

Zachęcam do przejrzenia pozostałych zbiorów z repozytorium, oraz do aktywnego dodawania własnych komend

When you modify a file in your repository, the change is initially unstaged. In order to commit it, you must stage it—that is, add it to the index—using git add. When you make a commit, the changes that are committed are those that have been added to the index.

git reset changes, at minimum, where your current branch is pointing. The difference between --mixed and --soft is whether or not your index is also modified. So, if we're on branch master with this series of commits:

- A - B - C (master)

HEADpoints to C and the index matches C.