Skip to content

Instantly share code, notes, and snippets.

14.4. Configuring Static Routes
Routing will be configured on routing devices, therefore it should not be necessary to configure static routes on Red Hat Enterprise Linux servers or clients. However, if static routes are required they can be configured for each interface. This can be useful if you have multiple interfaces in different subnets. Use the route command to display the IP routing table.
Static route configuration is stored in a /etc/sysconfig/network-scripts/route-interface file. For example, static routes for the eth0 interface would be stored in the /etc/sysconfig/network-scripts/route-eth0 file. The route-interface file has two formats: IP command arguments and network/netmask directives.
IP Command Arguments Format
Define a default gateway on the first line. This is only required if the default gateway is not set via DHCP:
@thanhtam92
thanhtam92 / eulersolution
Last active February 4, 2023 04:47
Euler Solution !!!!!!!!
http://eulersolutions.fr.yuku.com/
https://code.google.com/p/projecteuler-solutions/
https://wiki.python.org/moin/ProblemSets/Project%20Euler%20Solutions
http://www.nayuki.io/page/project-euler-solutions
1. 233168
2. 4613732
3. 6857
install tat ca cac goi: (libexpat1-dev libfontconfig1-dev libfreetype6-dev libice-dev libjbig-dev
libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblzma-dev libpng12-dev
libpthread-stubs0-dev libsm-dev libtiff5-dev libtiffxx5 libvpx-dev
libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxpm-dev
libxt-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
xorg-sgml-doctools xtrans-dev zlib1g-dev)
$ sudo apt-get install libgd2-dev
When I tried to use arrow keys in insert mode in vi editor the following characters are being inserted in the editor:
for ↓ I get B,
for ↑ I get A,
for ← I get D,
for → I get C.
====>
@thanhtam92
thanhtam92 / libcurl_dns.md
Created September 8, 2016 17:39 — forked from deltheil/libcurl_dns.md
libcurl options to control DNS lookup (cache, timeout, resolving time, etc). The short URL for this page is: http://git.io/libcurl-dns.

Easy handle interface

Options

Info

@thanhtam92
thanhtam92 / libevent-v-libuv.md
Created October 27, 2016 02:55 — forked from eddieh/libevent-v-libuv.md
libevent vs libuv

libevent vs libuv

Comparing libevent and libuv. My upfront biased: I want to like libevent. However, I want to objectively compare the two and make an informed decision.

What versions are we comparing?

  • libevent 2.0.22 (Stable) [2014-01-05]
  • libuv 1.8.0 (Stable) [2015-12-15]
@thanhtam92
thanhtam92 / message.hpp
Created February 28, 2017 08:09 — forked from mashiro/message.hpp
zeromq + msgpack
#include <string>
#include <ctime>
#include <msgpack.hpp>
struct message
{
std::string tag;
std::time_t time;
std::string text;
MSGPACK_DEFINE(tag, time, text);
find command:http://www.oreillynet.com/linux/cmd/cmd.csp?path=f/find
find . -maxdepth 1/2/..../n
%to just find them and printout:
find . -maxdepth 1 -name '[!.]*' -size 0 -printf 'Name: %16f Size: %6s\n'
%delete them, may be modified to use
find . -maxdepth 1 -name '[!.]*' -size 0 -printf 'Name: %16f Size: %6s\n' | xargs rm
http://content.hccfl.edu/pollock/unix/findcmd.htm
@thanhtam92
thanhtam92 / zeromq-vs-redis.md
Created January 18, 2018 10:31 — forked from hmartiro/zeromq-vs-redis.md
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

@thanhtam92
thanhtam92 / CMakeLists.txt
Created May 30, 2018 06:25 — forked from alorence/CMakeLists.txt
2 CMake macros returning the current date (format yyyy-mm-dd) and the current time (hh:mm:ss)
cmake_minimum_required(VERSION 2.8)
# Return the date (yyyy-mm-dd)
macro(DATE RESULT)
if(WIN32)
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/(....).*" "\\3-\\2-\\1" ${RESULT} ${${RESULT}})
elseif(UNIX)
execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
else()