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
var net = require('net'); | |
var clients = []; | |
net.createServer(function (socket) { | |
clients.push(socket); | |
socket.on('data', function (data) { | |
broadcast(data, socket); | |
}); |
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
add development tools: | |
yum groupinstall "Development tools" | |
more libraries: | |
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-deve | |
get python (might get other version): | |
wget http://python.org/ftp/python/2.7.7/Python-2.7.7.tar.xz | |
extract: |
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
pip install tornado | |
pip install gevent | |
pip install requests | |
pip install raven | |
tail both tornado files: |
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
function binary.pow(number,power) | |
{ | |
local i,base; | |
if(power==0) | |
{ | |
number=1; | |
} | |
else | |
{ | |
base=number; |
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
get specific document: | |
curl -XGET 'http://localhost:9200/php_logging/flv_pl/1' | |
get specific document: | |
curl -XGET 'http://localhost:9200/php_logging/flv_pl' | |
get documents: | |
curl http://localhost:9200/php_logging/_search?pretty=true&q=*:* |
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
# Setting Up a Pyenv Virtual Environment with Python 3.10.11 | |
Follow the instructions below to set up a new virtual environment, named "privategpt", utilizing Python 3.10.11 via Pyenv. | |
## 1. Installing Python 3.10.11 with Pyenv | |
Enter the command below to install Python 3.10: | |
```bash | |
pyenv install 3.10.11 |