Skip to content

Instantly share code, notes, and snippets.

@igavrysh
igavrysh / docker_commands.sh
Last active August 25, 2019 01:14
docker_commands
# https://springframework.guru/docker-cheat-sheet-for-spring-devlopers
# Run simple hello world docker image
docker run hello-world
# Show currently running docker images
docker ps
# Show docker history
docker ps -a
# make dirs
mkdir ~/Documents/gowork
mkdir ~/Documents/gowork/bin
mkdir ~/Documents/gowork/src
mkdir ~/Documents/gowork/pkg
export PATH=$PATH:/opt/gradle/gradle-6.2/bin
# Install sysfutils
sudo apt-get install sysfsutils
# edit /etc/sysfs.conf
devices/platform/i8042/serio1/serio2/sensitivity = 215
devices/platform/i8042/serio1/serio2/rate = 280
devices/platform/i8042/serio1/serio2/speed = 150
devices/platform/i8042/serio1/serio2/inertia = 1
# restart service
#!/bin/bash
# Copyright 2014 M. Isuru Tharanga Chrishantha Perera
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@igavrysh
igavrysh / set_cursor_size
Created March 4, 2020 03:50
Set cursor size in cinnamon
go to
/etc/X11/Xresources/x11-common
add line
Xcursor.size: 22
Xcursor.theme: DMZ-White
@igavrysh
igavrysh / set_cursor_size
Created March 4, 2020 03:50
Set cursor size in cinnamon
go to
/etc/X11/Xresources/x11-common
add line
Xcursor.size: 22
Xcursor.theme: DMZ-White
@igavrysh
igavrysh / ubuntu-install-ruby-1.8.7.sh
Created January 22, 2021 09:28 — forked from murphyslaw/ubuntu-install-ruby-1.8.7.sh
Install Ruby 1.8.7 with rbenv on Ubuntu
# Install system libraries.
sudo apt-get install zlib1g-dev openssl libssl-dev libreadline-dev git-core
# Install rbenv.
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Setup bash.
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
package main
import (
"fmt"
"math/rand"
"time"
"github.com/sajari/regression"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/plotter"
@igavrysh
igavrysh / insert_to_slice_perf_test.go
Last active July 14, 2021 23:10
insert_to_slice_perf_test.go
package main
import (
"fmt"
"math/rand"
"time"
"github.com/sajari/regression"
"gonum.org/v1/plot"
"gonum.org/v1/plot/plotter"
package main
import "sync"
type BinaryTreeData interface {
Less(element BinaryTreeData) bool
}
type BinaryTreeNode struct {
Data BinaryTreeData