Skip to content

Instantly share code, notes, and snippets.

View hightemp's full-sized avatar
🎯
Focusing

Anton Panov hightemp

🎯
Focusing
View GitHub Profile
@hightemp
hightemp / ARCH_INSTALL.MD
Created January 31, 2021 10:43 — forked from heppu/ARCH_INSTALL.MD
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@hightemp
hightemp / arch_linux_installation.md
Created January 31, 2021 10:43 — forked from OdinsPlasmaRifle/arch_linux_installation.md
LVM on LUKS Arch installation with systemd-boot
@hightemp
hightemp / 12021015.md
Created August 8, 2020 12:48 — forked from Chunlin-Li/12021015.md
node / javascript performance : Set vs Object and Map vs Object

Set vs Object

node version : v4.1.2
platform: Intel I7, 16G DDR3, Ubuntu x64

var theSet = new Set();
start = process.hrtime();
/***********************************/
for(let i = 0 ; i < N; i++ ) {
@hightemp
hightemp / vagrant-kvm.md
Created July 21, 2020 18:30 — forked from yuanying/vagrant-kvm.md
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@hightemp
hightemp / parse_hash.js
Created June 30, 2020 10:02 — forked from danmartens/parse_hash.js
Parses location.hash into an Object
window.parseHash = function() {
var parsed = {};
var pairs = window.location.hash.replace('#', '').split('&');
pairs.forEach(function(pair) {
parsed[pair.split('=')[0]] = (parseInt(pair.split('=')[1], 10) || pair.split('=')[1]);
});
return parsed;
};
@hightemp
hightemp / doxygen_on_centos_6.7
Created June 23, 2020 06:09 — forked from slog2/doxygen_on_centos_6.7
how to use Doxygen on CentOS 6.7
# Install
yum -y install doxygen
yum -y install graphviz
yum -y install texlive texlive-utils
# Make default config for doxygen
cd {c_source_dir}
doxygen -g my.doxy
@hightemp
hightemp / git.md
Created May 25, 2020 09:58 — forked from dustinmartin/gist:2966397
Git Command Cheatsheet

Setup

git clone clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

[color]

@hightemp
hightemp / reflog.sh
Created May 25, 2020 09:30 — forked from nickolasburr/reflog.sh
reflog: Pretty format `git reflog show` with optional flag options for refining reflog output
#!/usr/bin/env bash
# reflog: Pretty format `git reflog show` with optional flag options for refining reflog output
reflog () {
if [[ ! "$(git rev-parse --is-inside-work-tree)" ]] 2>/dev/null; then
echo "fatal: Not a git repository (or any of the parent directories): .git"
return 1
fi
# decorated `git reflog show` graph format style
@hightemp
hightemp / notes
Created April 10, 2020 21:03 — forked from justincormack/notes
criu setup Ubuntu 18.04
apt update
apt upgrade
apt install build-essential
apt install pkg-config
apt install libnet-dev python-yaml libaio-dev
apt install libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf libnl-3-dev libcap-dev python-future
# criu install
curl -O -sSL http://download.openvz.org/criu/criu-3.10.tar.bz2
tar xjf criu-3.10.tar.bz2
@hightemp
hightemp / README-setup-tunnel-as-systemd-service.md
Created March 8, 2020 16:23 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target