Skip to content

Instantly share code, notes, and snippets.

@Edyta2801
Edyta2801 / gist:585b0d1c8f2c985413c6bdfe995e9178
Created November 8, 2022 09:59
Discriminating Union Types
TypeScript
@Edyta2801
Edyta2801 / gist:d6ce203564e847d9a2c52990705a9f57
Last active January 20, 2021 11:58
extensions.json in .vscode
{
"recommendations": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"shardulm94.trailing-spaces",
"streetsidesoftware.code-spell-checker",
"formulahendry.auto-rename-tag",
"mgmcdermott.vscode-language-babel",
"VisualStudioExptTeam.vscodeintellicode"
@Edyta2801
Edyta2801 / gist:21f73b751307e751db520256a47d09d1
Last active June 25, 2024 01:39
can't automatically merge
https://blog.michelemattioni.me/2013/01/29/what-do-i-do-when-my-pull-request-does-not-merge-automatically-in-master/
Why this happens
The problem is that both in master and in your branch some files have been changed, and their going in different directions. The content of the file in master is different from the one in your feature_branch, and git does not know which one to pick, or how to integrate them.
To solve this, you need to
Get the latest upstream/master
Switch to your master
merge the latest master in your master (Never develop in master, always develop in a feature branch)
@Edyta2801
Edyta2801 / find-in-json.js
Created July 20, 2020 21:40 — forked from iwek/find-in-json.js
Searching through JSON
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //
[
{
"game": "Athens",
"edition": "1896",
"sport": "Aquatics",
"competition": "Swimming",
"player": "HAJOS, Alfred",
"FIELD6": "HUN",
"FIELD7": "Men",
"FIELD8": "100m freestyle",
This file has been truncated, but you can view the full file.
[
{
"game": "Athens",
"edition": "1896",
"sport": "Aquatics",
"competition": "Swimming",
"player": "HAJOS, Alfred",
"FIELD6": "HUN",
"FIELD7": "Men",
"FIELD8": "100m freestyle",
$bp-small: 550px;
$bp-medium: 760px;
$bp-desktop: 1024px;
$bp-wide: 1680px;
@mixin res($breakpoint) {
@if $breakpoint == wide {
@media screen and (min-width: $bp-wide) {
@content;
Plik/folder w twojej kontroli wersji nie usuwają się tylko dlatego, że dodałeś je do .gitignore. Są już w repozytorium i musisz je usunąć. Możesz to po prostu zrobić w ten sposób:
(Pamiętaj, aby zatwierdzić wszystko, co zmieniłeś, zanim to zrobisz.)
git rm -rf --cached .
git add .
Spowoduje to usunięcie wszystkich plików z repozytorium i dodanie ich z powrotem (tym razem przestrzegając reguł w .gitignore).
https://www.codingsips.com/install-configure-git-ftp-windows/
https://bielecki.info.pl/blog/szczegoly/uzywanie-git-ftp-do-publikowania-stron-internetowych
https://geekster.pl/git/przesylanie-plikow-na-serwer-ftp-za-pomoca-klienta-git-ftp/
[
{
"currencies": [
{
"code": "AFN",
"name": "Afghan afghani",
"symbol": "؋"
}
],
"languages": [