Skip to content

Instantly share code, notes, and snippets.

View suchov's full-sized avatar
🌎
Evolution through Education

Artem Sychov suchov

🌎
Evolution through Education
View GitHub Profile
@suchov
suchov / _readme.md
Created September 8, 2023 17:40 — forked from mislav/_readme.md
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

Most of our communication happens with each other via text. Without the benefit of verbal tone, facial expressions and other non-verbal queues, these communications tend to be [heavily influenced by how we are feeling at the time](https://www.psychologytoday.com/blog/contemporary-psychoanalysis-in-action/201502/why-is-there-so-much-miscommunication-email-and).
## Listening/Reading
* ALWAYS make the most respectful interpretation of what the others say.
* NEVER make negative assumptions about others' motivations. Unless a person clearly and explicitly communicates a negative intent one should never assume the worse based on non-explicit statements.
## Talking/Writing
* ALWAYS communicate in a respectful manner.
* NEVER act on or disclose confidential information to other people outside of a confidential circle.
1. We recommend to describe:
- what does the team do, what product do they develop, what business-model is in use,
project investment source, risks for a potential employee if one is engage
- the kind of work: is that a temporary contract, hourly rate, full-time, remote,
are you ready for move compensation from another city/country and what type of visa do you suggest.
- technology stack: what do you use and why? If you can't answer this question,
it would be better not to publish a job offer.
- process organization: timezones, calls, business trips, where does the code stored, how do you release, demo etc.
```
# Branch (b)
alias gb='git branch'
alias gbc='git checkout -b'
alias gbl='git branch -v'
alias gbL='git branch -av'
alias gbx='git branch -d'
alias gbX='git branch -D'
alias gbm='git branch -m'
alias gbM='git branch -M'
monthlyPayment = 0
monthlyInterestRate = annualInterestRate /12
newbalance = balance
month = 0
while newbalance > 0:
monthlyPayment += 10
newbalance = balance
for month in range(1,13):
year = 12
while year > 0:
monthlyInterestRate = annualInterestRate/12
minimumMonthlyPayment = monthlyPaymentRate * balance
monthlyUnpaidBalance = balance - minimumMonthlyPayment
balance = monthlyUnpaidBalance + (monthlyInterestRate * monthlyUnpaidBalance)
# print("Remaining balance: " + str(balance))
year -= 1
print("Remaining balance: " + str(round(balance, 2)))
@suchov
suchov / Factories Like Fixtures
Created April 12, 2017 19:26
Using Factories Like Fixtures
While we prefer factories over fixtures, it is important to use factories appropriately
to get any benefit. Occasionally we’ll see test suites create factory definitions as if they were fixtures:
factory :pam, class: User do
name "Pam"
manager false
end
factory :michael, class: User do
name "Michael"
Common helper methods should be extracted to `spec/support`, where they can be
organized by utility and automatically included into a specific subset of the tests.
# spec/support/kaminari_helper.rb
module KaminariHelper
def with_kaminari_per_page(value, &block)
old_value = Kaminari.config.default_per_page
Kaminari.config.default_per_page = value
block.call
ensure