Skip to content

Instantly share code, notes, and snippets.

View bburdiliak's full-sized avatar

Boris Burdiliak bburdiliak

View GitHub Profile
@bburdiliak
bburdiliak / prevent-wake-up-from-suspend.sh
Created January 5, 2021 10:28
resolve: immediate wake-up from suspend
cat /sys/bus/usb/devices/*/power/wakeup
ll /sys/bus/usb/devices/*/power/wakeup
cat /sys/bus/usb/devices/1-4/idVendor
cat /sys/bus/usb/devices/1-4/idProduct
echo "disabled" > /sys/bus/usb/devices/1-4/power/wakeup
@bburdiliak
bburdiliak / date_range_formatter_without_duplicity.rb
Last active November 21, 2020 00:16
Date range formatter without duplicity
# Takes in: 29/09/20 - 29/09/20
# Outputs: 2020-09-28 18:00:00..2020-09-29 17:59:59.999999
def add_time_to_date(date)
date_from, date_to = date.split(' - ').map { |d| Time.parse(convert_date_format(d)) }
date_from.beginning_of_day.to_datetime..date_to.end_of_day.to_datetime
end
def convert_date_format(value)
return DateTime.strptime(value, '%d/%m/%y').strftime("%Y-%m-%d")
@bburdiliak
bburdiliak / touchscreen_commands.sh
Created June 26, 2020 12:50
Wacom touchscreen management on Ubuntu 20.04
`xinput list`
import React, { useState } from 'react';
import { Fab, Grid, Menu, MenuItem, Paper, Table, TableBody, TableCell, TableRow, } from '@material-ui/core';
import { Done } from '@material-ui/icons';
import { withStyles, createStyles } from '@material-ui/core/styles';
import { compose, map, prop, find, isEmpty } from 'ramda';
import { usePopupState, bindTrigger, bindMenu } from 'material-ui-popup-state/hooks';
import { withRouter } from 'react-router';
import { useTranslation } from 'react-i18next';
import { loadedGraphql } from '~components/hoc';

Keybase proof

I hereby claim:

  • I am bburdiliak on github.
  • I am burdo (https://keybase.io/burdo) on keybase.
  • I have a public key ASBUfuXXJYSZawTC5-CiWp9-kB3R28NC6pPAdPBCqIEawQo

To claim this, I am signing this object:

@bburdiliak
bburdiliak / ubuntu.sh
Last active August 29, 2018 07:13
Useful commands
## Disk management
# how big is your apt cache:
du -sh /var/cache/apt/archives
# remove old kernels (if no longer required)
sudo apt-get autoremove --purge
# list all directories and sort by size
du -m --max-depth 1 | sort -rn
chrome://serviceworker-internals/
chrome://appcache-internals/
@bburdiliak
bburdiliak / gist:2fc51e7c243754e55844c80759cd372d
Last active February 20, 2017 13:50
react native / android
* start android virtual device
android avd
* list all SDKs
android list sdk -a
* install 3rd SDK from that list
android update sdk -a -u -t 3
* Linux-based systems support VM acceleration through the KVM software package, check availability of KVM
version of V8 used by current NodeJS
node -p process.versions.v8