Skip to content

Instantly share code, notes, and snippets.

View cytrowski's full-sized avatar
💭
I may be slow to respond. I have a bunch of junior front-end developers to make

Bartosz Cytrowski cytrowski

💭
I may be slow to respond. I have a bunch of junior front-end developers to make
View GitHub Profile
@cytrowski
cytrowski / polecenia_git.md
Created November 22, 2017 18:36 — forked from chajr/polecenia_git.md
Polecenia GIT

Przydatne polecenia GIT

  • git init - inicjalizuje repozytorium GIT w katalogu
  • git clone {adres repozytorium} - klonuje repozytorium do katalogu
  • git status - pokazuje status repozytorium (pokazuje informację o zmodyfikowanych, nowych, usuniętych oraz nie należące do repozytorium plikach)
  • git remote add {jakaś nazwa} {adres repozytorium} - dodaje repozytorium innego użytkownika (git remote add upstream https://github.com/bluetree-service/idylla.git)
  • git remote -v lista wszystkich zewnetrznych repozytoriów
  • git remote rm {nazwa dla remota} - usuwa zewnętrzne repozytorium
  • git fetch {nazwa remota} - pobiera listę zmian z innego repozytorium (w tym pokazuje nowe gałęzie)
  • git branch - lista gałęzi w repozytorium
@cytrowski
cytrowski / ASS.md
Created November 29, 2019 18:50 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

Polecenia konsoli Linux

Operacje na plikach i katalogach

  • pwd - aktualny katalog
  • ls -la - listuje wszystkie dostępne pliki
  • ls -lat - listuje wszystkie dostępne pliki posortowane według czasu modyfikacji
  • cp -r {nazwa pliku/katalogu} {miejsce docelowe} - kopiuje plik lub cały katalog z zawartością we wskazane miejsce
  • mv {nazwa pliku/katalogu} {miejsce docelowe} - przenosi plik lub cały katalog z zawartością we wskazane miejsce (jeśli lokalizacja pliku docelowego jest taka sama jak pliku do przeniesienia, zmienia nazwę)
  • du -sh - pokazuje zajętość całego katalogu
  • du -sh * - pokazuje rozmiar poszczególnych plików i katalogów
@cytrowski
cytrowski / config.md
Created September 16, 2018 10:17 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

// Core
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const db = admin.database();
admin.auth().createUser({
uid: uid,
displayName: displayName,
photoURL: photoURL
@cytrowski
cytrowski / Firebase Database API Cheatsheet
Created February 26, 2019 13:38 — forked from odigity/Firebase Database API Cheatsheet
Firebase Database API Cheatsheet
There is no way to store an empty object/array/null value.
There are also no actual arrays. Array values get stored as objects with integer keys.
(If all keys are integers, it will be returned as an array.)
Basically, it's one giant tree of hashes with string keys.
Simply write a value to any location, and the intermediary locations will automatically come into existance.
── Classes ──
DataSnapshot : Container for a subtree of data at a particular location.
@cytrowski
cytrowski / email.js
Last active January 11, 2019 17:32 — forked from rmrotek/email.js
random code
var emailForm = document.getElementById("emailForm");
function report(item, status) {
console.log("item " + (status ? "succeed" : "failed"));
}
function handleForm(event) {
event.preventDefault();
const checkboxIsValid = document.getElementById("myCheck").checked;
@cytrowski
cytrowski / curl.md
Created November 30, 2018 00:36 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@cytrowski
cytrowski / gist:570f2bff66f9b1b28296d06f1aec2152
Created August 11, 2018 10:03 — forked from libitte/gist:cbde168d26bc5faf9bf9fef648091b42
FIX warning: ignoring broken ref refs/remotes/origin/HEAD

warning: ignoring broken ref refs/remotes/origin/HEAD


➜   ✗ g symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/develop
➜   ✗ g fetch --prune
➜   ✗ g gc

@cytrowski
cytrowski / vscode-extensions.sh
Created June 30, 2018 06:19 — forked from michalczukm/vscode-extensions.sh
Visual Studio Extensions list and short script to build installable list
##!/bin/bash
# ======= Generate extensions list by:
#code --list-extensions | while read line; do
# echo code --install-extension $line
#done
# ======== My current extensions list
code --install-extension Angular.ng-template
code --install-extension EditorConfig.EditorConfig
code --install-extension PeterJausovec.vscode-docker