Skip to content

Instantly share code, notes, and snippets.

View boo1ean's full-sized avatar
🎯
Focusing

Egor Gumenyuk boo1ean

🎯
Focusing
View GitHub Profile

db: postgres

table cols: timestamp, userId, event { 'in', 'out' }

The report should be:

for given time range (startDate, endDate)

grouped by period (day, week, month)

@boo1ean
boo1ean / 1.js
Last active July 14, 2020 19:33
function findLadders (beginWord, endWord, wordList) {
let results = []
let paths = [[beginWord]]
while (true) {
findPossibleMutations()
if (results.length) {
return results
}
@boo1ean
boo1ean / manjaro-change-default-browser.md
Created April 15, 2019 16:45
manjaro-change-default-browser.md

Update $BROWSER env var

vim ~/.profile

export BROWSER=/usr/bin/google-chrome-stable

Remove mime bindings

@boo1ean
boo1ean / bluetooth-headphones-on-linux.md
Last active April 15, 2019 08:45
bluetooth-headphones-on-linux
yay -S pulseaudio-bluetooth bluez-utils
sudo vim /etc/bluetooth/main.conf 

ControllerMode = bredr
AutoEnable=true
printWarning @ warning.js:33
warning @ warning.js:57
handleElement @ ReactDOMNullInputValuePropHook.js:25
onBeforeUpdateComponent @ ReactDOMNullInputValuePropHook.js:36
callHook @ ReactDebugTool.js:25
emitEvent @ ReactDebugTool.js:37
onBeforeUpdateComponent @ ReactDebugTool.js:324
receiveComponent @ ReactReconciler.js:112
updateChildren @ ReactChildReconciler.js:107
_reconcilerUpdateChildren @ ReactMultiChild.js:204
fn sort(list: &mut [i32]) -> &mut [i32] {
list[0] = list[1];
list
}
fn main() {
println!("Hello, world!");
let mut v = vec![1, 2, 3];
let q = sort(&mut v);
q[2] = q[1];
const cars = [
{
title: 'Opel',
power: 100,
},
{
title: 'Audi',
power: 200,
},
{
const EditPage = (props) => {
switch (true) {
case editPlatformNoData(props): return fetchPlatform(props)
case editPlatformHasData(props): return <EditForm onSubmit={props.updatePlatform} initialValues={props.data} />
case newPlatform(props): return <EditForm onSubmit={props.createPlatform} />
case error(props): return <h2>нельзя такое редактировать</h2>
default: throw new Error('Undefined state')
}
class Math {
add(a, b) {
return a + b;
}
sub(a, b) {
return a - b;
}
}
module.exports = {
sum: (a, b) => {
return a + b;
},
sub: (a, b) => {
return a - b;
}
}