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 / 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.

// 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 / 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".

@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
@cytrowski
cytrowski / bitcolor.js
Created March 22, 2018 00:29 — forked from lrvick/bitcolor.js
Javascript functions for doing fast binary/hex/RGB color conversions using bitwise operations.
// convert 0..255 R,G,B values to binary string
RGBToBin = function(r,g,b){
var bin = r << 16 | g << 8 | b;
return (function(h){
return new Array(25-h.length).join("0")+h
})(bin.toString(2))
}
// convert 0..255 R,G,B values to a hexidecimal color string
RGBToHex = function(r,g,b){
@cytrowski
cytrowski / gist:87806b40b5b761f5a67ed6d3ad32b5b9
Created February 19, 2018 12:10 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: