$ uname -r
This file contains hidden or 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 | |
| mysqlbinlog56=/store/mysql-5.6.23-linux-glibc2.5-x86_64/bin/mysqlbinlog | |
| mysqlclient=/store/mysql-5.6.23-linux-glibc2.5-x86_64/bin/mysql | |
| pidfile=/var/run/binlogstream.pid | |
| binlogdir=/store/binlogstreamer/binlogs | |
| binlogprefix=mysql-bin | |
| mysqluser=tester | |
| mysqlpass=tester | |
| mysqlmaster=10.72.100.236 |
- Download build-tools
apt-get install build-essential cmake -y
- Configure the compiler
cmake \
-DWITH_BOOST=/usr/local/src/mysql-5.7.19/boost/boost_1_59_0 \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql57 \
This file contains hidden or 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 | |
| #title : replication-start.sh | |
| #description : This script automates the process of starting a Mysql Replication on 1 master node and N slave nodes. | |
| #author : Nicolas Di Tullio | |
| #date : 20160706 | |
| #version : 0.2 | |
| #usage : bash mysql_replication_autostart.sh | |
| #bash_version : 4.3.11(1)-release | |
| #============================================================================= |
This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |
This file contains hidden or 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
| <!--- In a ui page --> | |
| <!-- this will get the token on the server side and set it to a client-side javascript variable. | |
| <g:evaluate object="true"> | |
| var g_ck = gs.getSessionToken(); | |
| </g:evaluate> | |
| <script> | |
| window.g_ck = "$[g_ck]"; | |
| </script> | |
| <!-- In your AngularJS config, you can set the token as a default $httpProvider header --> |
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
- Uninstall and reinstall the ssh server using the following commands:
sudo apt remove openssh-serversudo apt install openssh-server
- Edit the
/etc/ssh/sshd_configfile by running the commandsudo vi /etc/ssh/sshd_configand do the following- Change
Portto 2222 (or any other port above 1000)
- Change
- Change
UsePrivilegeSeparationto no
This file contains hidden or 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
| /** | |
| * MongoDB query to delete outdated files from Rocket.Chat. You can specify the number of DAYS | |
| * before a file is considered outdated. Deleted files are removed from GridFS completely keeping | |
| * only the message in chat. The message is modified to be a link that points to ALT_LINK instead | |
| * of the file and '(deleted)' is appended to the title. | |
| * | |
| * Tested with MongoDB 3.4 | |
| */ | |
| const DAYS = 60; |