Skip to content

Instantly share code, notes, and snippets.

@cherepanov
cherepanov / I21_dualos_pipo_BIOS.rom
Last active January 27, 2024 16:14
ubuntu 24.04 on Pipo X9
This file has been truncated, but you can view the full file.
@cherepanov
cherepanov / dayjs.ts
Last active February 4, 2023 10:48
dayjs config
import 'dayjs/locale/ru';
import customParseFormat from 'dayjs/plugin/customParseFormat';
import dayjs from 'dayjs';
import dayOfYear from 'dayjs/plugin/dayOfYear';
import devHelper from 'dayjs/plugin/devHelper';
import duration from 'dayjs/plugin/duration';
import type { Duration } from 'dayjs/plugin/duration';
import isoWeek from 'dayjs/plugin/isoWeek';
import relativeTime from 'dayjs/plugin/relativeTime';
import toObject from 'dayjs/plugin/toObject';
@cherepanov
cherepanov / power.sh
Created September 16, 2021 08:30
Gigabyte AERO OLED 15 KD ubuntu
# https://github.com/linux-thinkpad/tp_smapi
@cherepanov
cherepanov / datetime.ts
Last active May 26, 2021 11:43
dayjs mobx-state-tree types
import dayjs from 'dayjs';
import { types } from 'mobx-state-tree';
export const DateTimeType = types.custom<string | dayjs.Dayjs, dayjs.Dayjs>({
name: 'DateTime',
isTargetType(value) {
return dayjs.isDuration(value);
},
getValidationMessage(value) {
if (dayjs(value).isValid()) return '';
xrandr --listmonitors
xrandr --output DVI-I-2-1 --scale 2x2 --pos 0x0 --output eDP-1-1 --pos 640x2160
#xrandr --output eDP-1-1 --primary --pos 640x2160
#xrandr --output DVI-I-2-1 --scale 2x2 --pos 0x0
#xrandr --output DVI-I-2-1 --scale 1x1 --pos 0x0 --output eDP-1-1 --pos 160x1080
xrandr --listmonitors
xrandr --output eDP-1-1 --primary
xrandr --output DP-1.2 --right-of eDP-1-1
@cherepanov
cherepanov / bashrc
Last active February 25, 2020 14:34
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
grep "cpu MHz" /proc/cpuinfo | sed 's/-/ /g' | awk '{ print $4 '} | sed 's/\./ /' | awk '{ print $1 }' | tr '\n' ' '
sensors | grep Core | sed 's/-/ /g' | awk '{ print $3 '}
@cherepanov
cherepanov / cinnamon-build.sh
Last active October 13, 2019 14:44
compile latest cinnamon on ubuntu 19.10
#set -o xtrace
#set -o errexit
#set -e
sudo apt install -y libmozjs-52-dev libreadline-dev libexif-dev libgail-3-dev
sudo apt install -y debhelper intltool libgdk-pixbuf2.0-dev libgirepository1.0-dev \
libglib2.0-dev libgnomekbd-dev libgtk-3-dev libx11-dev libxkbfile-dev \
python-gi-dev valac libaccountsservice-dev libpulse-dev \
gnome-common gnome-pkg-tools \
#! /bin/sh
# Script to get all the PPA installed on a system
for APT in `find /etc/apt/ -name \*.list`; do
grep -Po "(?<=^deb\s).*?(?=#|$)" $APT | while read ENTRY ; do
HOST=`echo $ENTRY | cut -d/ -f3`
USER=`echo $ENTRY | cut -d/ -f4`
PPA=`echo $ENTRY | cut -d/ -f5`
#echo sudo apt-add-repository ppa:$USER/$PPA
if [ "ppa.launchpad.net" = "$HOST" ]; then
echo sudo apt-add-repository ppa:$USER/$PPA