Skip to content

Instantly share code, notes, and snippets.

View mvlabat's full-sized avatar
🦀
Rusting

Vladyslav Batyrenko mvlabat

🦀
Rusting
View GitHub Profile
@mvlabat
mvlabat / Gentoo kernel update
Last active March 31, 2016 19:42
Updating kernel on Gentoo
# Rebuild only
make modules_prepare
make -j8 # Threads count
make modules_install
make install
#make modules_prepare && make -j8 && make modules_install && make install
@mvlabat
mvlabat / Gentoo chroot
Created March 31, 2016 20:38
Chrooting in gentoo from any another Gentoo installation (+liveCD)
mount /dev/sdb3 /mnt/gentoo # Use your system root device
mount -t proc proc /mnt/gentoo/proc/
mount --rbind /sys /mnt/gentoo/sys/
mount --rbind /dev /mnt/gentoo/dev/
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"
@mvlabat
mvlabat / Linux mount ISO
Last active April 6, 2016 09:30
Mount ISO
mount -o loop disk1.iso /mnt/iso
@mvlabat
mvlabat / qemu run
Created April 1, 2016 15:30
Qemu run
SPICE_PORT=5924
qemu-system-x86_64 \
-daemonize \
-localtime \
-cpu host \
-enable-kvm \
-hda /home/mvlabat/qemu/WindowsVM.img \
-hdb /dev/sda3 \
-net nic -net user,hostname=windowsvm \
@mvlabat
mvlabat / qemu install
Created April 1, 2016 15:30
Qemu install
exec qemu-system-x86_64 \
-localtime \
-cpu host \
-enable-kvm \
-boot d -cdrom /home/mvlabat/qemu/WINDOWS.iso \
-hda /home/mvlabat/qemu/WindowsVM.img \
-net nic -net user,hostname=windowsvm \
-m 1G \
-monitor stdio \
-name Windows \
@mvlabat
mvlabat / wait continueWith
Created April 6, 2016 09:27
Wait for all the continueWith. Tasks and Actions are used in the example.
static private Func<int, int, int> count = (count, price) =>
{
return count * price;
};
private void calcButton_Click(object sender, EventArgs e)
{
int firstCount, secondCount, thirdCount;
int price = 0;
@mvlabat
mvlabat / court_scrapper.js
Created June 19, 2016 09:44
Ukrainian court links gatherer
var request = require('request');
var fs = require('fs');
var kue = require('kue'),
queue = kue.createQueue();
// Init post parameters.
var court_type = 5;
var reg_id = 1;
// Init concurrency parameters.
@mvlabat
mvlabat / ue4-building-scripts
Created September 19, 2016 11:30
Building Unreal Engine 4 MyProject from command line for Windows and Linux platforms
# Windows
Build MyProjectEditor Win64 Development "D:\Unreal\MyProject\MyProject.uproject" -waitmutex
# Linux
Build.sh MyProjectEditor Linux Development "/home/mvlabat/unreal/projects/MyProject/MyProject.uproject" -waitmutex

Keybase proof

I hereby claim:

  • I am mvlabat on github.
  • I am mvlabat (https://keybase.io/mvlabat) on keybase.
  • I have a public key whose fingerprint is D76B 7F7A F8DA 60A8 EBC3 63F9 8CEB B8A8 6868 72F6

To claim this, I am signing this object:

@mvlabat
mvlabat / commit-msg
Last active April 10, 2017 14:46
Prepend branch task code or "techdebt: " to git commit message
#!/bin/bash
commit_msg=$(<$1)
branch_name=$(git symbolic-ref HEAD)
regex='(\[#[0-9]+\]|techdebt\:) .+'
[[ $commit_msg =~ $regex ]] && exit 0
regex='refs\/heads\/(feature|bugfix|hotfix|techdebt)\/([0-9]+)-.+'
[[ $branch_name =~ $regex ]] && task_code="${BASH_REMATCH[2]}"