Skip to content

Instantly share code, notes, and snippets.

@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
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:
When building native ruby gems, sometimes you'll get an error containing "ruby extconf.rb". This is often caused by missing dev libraries for the gem you're installing, or even ruby itself. Do you have apt installed on your machine? If not, I'd recommend installing it, it's a quick and easy way to get a lot of dev libraries. If you see people suggest installing "libmagick9-dev", that's an apt package that you'd install with:
$ sudo apt-get install libmagickwand-dev
or on centOs:
$ yum install ImageMagick-devel
On mac, you can use Homebrew:
$ brew install imagemagick
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at http://rvm.io/packages/openssl.
https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-centos-6-with-rvm
http://rvm.io/packages/openssl
@thanhtam92
thanhtam92 / install java linux
Created October 28, 2014 14:46
install java on centos
http://www.cyberciti.biz/faq/centos-linux-6-install-java-sdk/
@thanhtam92
thanhtam92 / SmartGit Trial
Created October 28, 2014 14:33
Changing SmartGit Free Trial License to Non-Commercial
Changing SmartGit Free Trial License to Non-Commercial
Some developers might overlook the license selection when using the SmartGit. Instead of choose non-commercial, they by default clicked Next on the “30 days Free Trial”. Worse thing is reinstall the SmartGit won’t get you to change the license.
To alter the license. First, go to
Windows: %APPDATA%\syntevo\SmartGit\<main-smartgit-version>
OS X: ~/Library/Preferences/SmartGit/<main-smartgit-version>
Unix/Linux: ~/.smartgit/<main-smartgit-version>
@thanhtam92
thanhtam92 / Mount NTFS Centos
Created October 21, 2014 12:17
How to Enable NTFS mount Centos
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y install ntfs-3g
Ref: http://www.sohailriaz.com/how-to-enable-ntfs-support-in-centos-6-3/
@thanhtam92
thanhtam92 / setup fpt linux-constos
Created October 13, 2014 05:47
setup fpt linux-constos
http://ostechnix.wordpress.com/2013/12/15/setup-ftp-server-step-by-step-in-centos-6-x-rhel-6-x-scientific-linux-6-x/
@thanhtam92
thanhtam92 / linux
Last active August 29, 2015 14:07
iptables, open port linux,
http://www.cyberciti.biz/tips/linux-iptables-examples.html
http://www.cyberciti.biz/faq/linux-unix-open-ports/
http://serverfault.com/questions/163244/linux-kernel-not-passing-through-multicast-udp-packets
@thanhtam92
thanhtam92 / enable telnet linux centos
Last active January 24, 2018 19:46
enable telnet linux centos
http://www.unixmen.com/how-to-install-telnet-in-centos-rhel-scientific-linux-6-4/
-------------------------------------------------------------------------------------------------------------
Telnet is a network protocol which is used to connect to remote computers over TCP/IP network. You can make a connection to a remote host using telnet. Once you establish a connection to the remote computer, it becomes a virtual terminal and will allow you to communicate with the remote host from your computer.
Installing telnet on CentOS 6.4
Open your terminal and type the following command to install telnet:
[root@server ~]# yum install telnet telnet-server -y