Skip to content

Instantly share code, notes, and snippets.

View Splinter1984's full-sized avatar
:octocat:
SEE YOU SPACE SAMURAI

Andrianov Roman Splinter1984

:octocat:
SEE YOU SPACE SAMURAI
View GitHub Profile
@Splinter1984
Splinter1984 / master.vim
Created April 19, 2023 18:17 — forked from benjamincharity/master.vim
Master Vim with this interactive tutorial.
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
// schedule_read is called o start reading
void connection::connect()
{
boost::asio::ip::tcp::resolver resolver(_io);
boost::asio::ip::tcp::resolver::query query(_hostname, std::to_string(_port));
boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve(query);
boost::system::error_code ec;
boost::asio::connect(_socket, iterator, ec);
if (ec)
@Splinter1984
Splinter1984 / lib.rs
Last active February 7, 2022 06:50 — forked from Gadiguibou/lib.rs
Combinations in Rust
fn comb<T>(slice: &[T], k: usize) -> Vec<Vec<T>>
where
T: Copy,
{
//If k == 0, return a empty new vector
if k == 0 {
return vec![vec![]];
}
// If arr.is_empty(), return a empty new vector
if arr.is_empty() {
@Splinter1984
Splinter1984 / dynamic-urdf-publisher.py
Created January 10, 2022 18:01 — forked from guru-florida/dynamic-urdf-publisher.py
Monitor URDF file and dynamically update RViz2
#
# Dynamic URDF Publisher
#
# This script monitors a URDF file and when changed will publish to /robot_description
#
# Requirements:
# Besides the standard Ros2 modules, Install watchdog module for listening
# to filesystem events:
# `pip3 install watchdog`
#