This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eo pipefail | |
declare -A graph | |
declare -a distances | |
function min { | |
if [[ $1 -lt $2 ]]; then | |
printf "%s" "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Diamond-square algorithm | |
// MIT License | |
// | |
// Copyright (c) 2019 Alexander Korzun | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/tmp/libelfin/libelfin $ ls | |
dwarf elf examples LICENSE Makefile README.md test | |
~/tmp/libelfin/libelfin $ make -j4 | |
make -C elf | |
make[1]: Entering directory '/home/kodopp/tmp/libelfin/libelfin/elf' | |
g++ -g -O2 -Werror -std=c++0x -Wall -fPIC -c -o elf.o elf.cc | |
g++ -g -O2 -Werror -std=c++0x -Wall -fPIC -c -o mmap_loader.o mmap_loader.cc | |
ln -s libelf++.so.0 libelf++.so | |
python3 enum-print.py -u --hex --no-type --mask shf --mask pf \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/tmp $ pacman -Qi libelfin-git # OK, Package not installed | |
error: package 'libelfin-git' was not found | |
~/tmp $ pkg-config --libs --cflags libelf++ # OK, Package not installed, so libelf++.pc does not exist yet | |
Package libelf++ was not found in the pkg-config search path. | |
Perhaps you should add the directory containing `libelf++.pc' | |
to the PKG_CONFIG_PATH environment variable | |
Package 'libelf++', required by 'virtual:world', not found | |
~/tmp $ # Install libelfin-git package (quite a large piece of terminal transcript; notice makepkg WARNING on line 100 and sed command on line 90) | |
~/tmp $ git clone https://aur.archlinux.org/libelfin-git | |
Cloning into 'libelfin-git'... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from silly_parser import * | |
adv = Terminal('ADV') | |
v = Terminal('V') | |
adj = Terminal('ADJ') | |
n = Terminal('N') | |
vp = adv.many().optional() + v | |
np = adj.many().optional() + n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
linechar = '\x1b[92m|\x1b[0m' if sys.stdout.isatty() else '|' | |
def indent(nest): | |
sys.stdout.write('{} '.format(linechar) * nest) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inoremap <C-W> <Esc>:w<CR>a | |
inoremap <F7> <Esc>:w<CR>a | |
nmap <F2> :! | |
imap <F2> <Esc>:! | |
imap <C-F><F9> <F2>CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR> | |
nmap <C-F><F9> <F2>CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR> | |
imap <C-F><F10> <F2>FORCE_REBUILD=yes CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR> | |
nmap <C-F><F10> <F2>FORCE_REBUILD=yes CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR> | |
set number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
// Легально скопипащено с https://github.com/kodo-pp/vsosh-region-preparation/ | |
using namespace std; | |
default_random_engine gen; | |
uniform_real_distribution<double> dist(0.0, 1.0); | |
void init_rng() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ coredumpctl dump -o tilix.coredump tilix | |
PID: 11306 (tilix) | |
UID: 1000 (kodopp) | |
GID: 1000 (kodopp) | |
Signal: 6 (ABRT) | |
Timestamp: Fri 2019-01-25 22:50:51 MSK (1min 29s ago) | |
Command Line: tilix | |
Executable: /usr/bin/tilix | |
Control Group: /user.slice/user-1000.slice/session-2.scope | |
Unit: session-2.scope |
NewerOlder