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
# Oracle Linux 6.* there is no support for the tmux, but I really like tmux. | |
# | |
# based on https://gist.github.com/jelsas/864090 | |
#remap Ctrl+A to Ctrl+B | |
escape ^Bb | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' |
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
set CLASSPATH=%CLASSPATH;fop\fop-2.2.jar;fop\avalon-framework-api-4.3.1.jar;fop\avalon-framework-impl-4.3.1.jar;fop\commons-logging-1.0.4.jar;fop\commons-io-1.3.1.jar;fop\fontbox-2.0.4.jar;fop\xmlgraphics-commons-2.2.jar | |
java org.apache.fop.fonts.apps.TTFReader arial.ttf arial.xml | |
java org.apache.fop.fonts.apps.TTFReader DejaVuSans.ttf DejaVuSans.xml | |
java org.apache.fop.fonts.apps.TTFReader DejaVuSans-Bold.ttf DejaVuSans-Bold.xml | |
java org.apache.fop.fonts.apps.TTFReader DejaVuSans-BoldOblique.ttf DejaVuSans-BoldOblique.xml | |
java org.apache.fop.fonts.apps.TTFReader DejaVuSans-Oblique.ttf DejaVuSans-Oblique.xml |
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
-bash-4.1$ gdb | |
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6) | |
Copyright (C) 2010 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-redhat-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>. |
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
#!/bin/bash | |
# prepare envirionment | |
sudo apt-get install tmux vim sudo | |
add `username` to `sudo` group | |
usermod -aG sudo `username` | |
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit |
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
# | |
# Install Docker Oracle Linux 7 | |
# based on https://blogs.oracle.com/hlsu/install-docker-on-oracle-linux-7 | |
# | |
# Preparation | |
sudo yum install -y vim | |
# cd /etc/yum.repos.d/ | |
# curl -O http://yum.oracle.com/public-yum-ol7.repo |
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
# debian | |
apt-get install vim curl sudo tmux htop mc | |
apt-get install 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
#include <vector> | |
#include <iostream> | |
template<class T> | |
std::vector<T> bubbleSort(std::vector<T> data) { | |
bool changed; | |
do { | |
changed = false; |
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 <vector> | |
#include <iostream> | |
#include <string> | |
std::string simpleRotate(const std::string data) { | |
return std::string(data.rbegin(), data.rend()); | |
} | |
std::string badRotate(std::string data) { | |
auto size = data.size(); |
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 <vector> | |
#include <iostream> | |
#include <sstream> | |
std::string RLE(std::string data) { | |
std::stringstream ss; | |
auto size = data.size(); | |
size_t sequenceCounter = 0; | |
for (size_t i = 0; i < size; i++) { | |
auto currentChar = data[i]; |
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
/* | |
Validate if a given string is numeric. | |
Some examples: | |
"0" => true | |
" 0.1 " => true | |
"abc" => false | |
"1 a" => false | |
"2e10" => true |