Skip to content

Instantly share code, notes, and snippets.

@yugarinn
yugarinn / ternary.ts
Created October 1, 2019 06:27
ternary operator
// NO?
validator.isValid()
? (this.status = Statuses.Valid)
: (this.status = Statuses.Invalid);
// YES?
this.status = validator.isValid()
? Statuses.Valid
: Statuses.Invalid;
@yugarinn
yugarinn / git-bits.md
Created January 28, 2019 17:18
git-bits

RGCIFUWWWTOEJBY or "Random Git Conventions I Found Useful While Working With Teams Or Even Just By Myself"

Each of this RGCIFUWWWTOEJBY's can be used by themselves or in combination with everything else.

How often should I commit?

As often as logically possible. I mean, commits are free of charge.

How to name my commits?

  1. Limit the message to 50 characters.
  2. Capitalize the first word.
  3. Use the imperative mode. As a rule a thumb, imagine you are trying to complete the phrase "When applied, this commit will ______".
@yugarinn
yugarinn / git-flow.md
Last active January 29, 2019 22:13
Gitflow Blog Post

YAGFBWP

"Yet Another Gitflow Based Workflow Post"

Introduction

Working with Git is easy. At the same time, it has enough depth and features to let you screw up your codebase at a considerable level. That's why the web is full of Git tutorials, blog posts and articles. That's also why a bunch of smart people have come up with certain Git workflows to avoid finding yourself lost in a sea of unmanageable changes. Let's dig into one of them.

As every decent Version Control System, Git has three core functionalities: store content, track changes to that content, and distribute the content and change history to possible collaborators. The way those changes are stored and organized is entirely up to the developer. This is going to be a very opinionated post about how to organize your Git workflow. I will explain how one these already existing workflow works, and introduce some small rules and changes on top of it. Said workflow is, obviosuly, Gitflow, created by Vincent Driessen.

Prerequisites

F

@yugarinn
yugarinn / 2019.csv
Last active January 28, 2019 11:56
2019 log
date work chores leisure sleep study climb run outside mood
20190101 0 0 0 0 0 0 0 0 -
20190102 7 0 0 0 0 0 0 0 -
20190103 11 0 0 0 0 0 0 0 -
20190104 9 0 0 0 0 0 0 0 -
20190105 0 0 0 0 0 0 0 0 -
20190106 0 0 0 0 0 0 0 0 -
20190107 0 0 0 0 0 0 0 0 -
20190108 7 0 0 0 2.5 0 0 0 -
20190109 8 2 1 4 0 2 0 0 7
@yugarinn
yugarinn / devlog.md
Last active January 17, 2019 16:00
my/devlog

my/devlog

20190115

  • [PHP] It might FUCKING occur that in order to see code changes you have to restart the php-fpm service

20190111

git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]
@yugarinn
yugarinn / frases
Last active May 15, 2017 14:01
frases
- No te pongas ahora a picar como un Zulú.
- Qué es una raya más en un tigre.
- Te explicas peor que un libro en llamas.
- No te tires los pedos más altos que el culo.
- Eso es la auténtica salud.
- Yo voy siempre a favor de obra.
- Has estado pensando fuera del recipiente.
@yugarinn
yugarinn / music
Last active August 7, 2020 08:53
Music Worth Fighting For
Music Worth Fighting For
---
1. Red Hot Chili Peppers
2. The Police
3. The Rolling Stones
4. Crystal Fighters
5. Lera Lynn
6. Bob Dylan
7. Twenty One Pilots
@yugarinn
yugarinn / yodo_install.sh
Last active April 6, 2016 13:43
yodo installer
#!/usr/bin/env bash
# yodo installation script
cd
update=false
case "$OSTYPE" in
darwin*) echo 'export PATH="~/.yodo:$PATH"' >> ~/.bash_profile; source ~/.bash_profile ;;
linux*) echo 'export PATH="~/.yodo:$PATH"' >> ~/.bashrc; source ~/.bashrc; echo 'linux' ;;
@yugarinn
yugarinn / finnnjake
Last active March 3, 2016 10:22
Finn n Jake
| (• ◡•)|╯╰( ❍ᴥ❍ ʋ )