Skip to content

Instantly share code, notes, and snippets.

@Alexnder
Alexnder / error.md
Last active August 29, 2015 14:15
node windows npm install mongoose bcrypt

mongoose error

node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
child_process: customFds option is deprecated, use stdio instead.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t argets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform T oolset = 'v100') cannot be found. To build using the v100 build tools, please i nstall Visual Studio 2010 build tools.  Alternatively, you may upgrade to the c urrent Visual Studio tools by selecting the Project menu or right-click the sol ution, and then selecting "Upgrade Solution...". [D:\Projects\node\onlineorgani zer\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
You need set visual studio version if you have not VS 2010. Like this:

npm install mongoose --save --msvs_version=2013

systemLog:
destination: file
path: "C:\\Program Files\\MongoDB 2.6 Standard\\mongodb.log"
logAppend: true
storage:
dbPath: "C:\\Program Files\\MongoDB 2.6 Standard\\data"
journal:
enabled: true
net:
bindIp: 127.0.0.1
@Alexnder
Alexnder / debian.md
Last active July 22, 2016 19:54
Debian ez publish legacy install

Install nginx, mysql, php and other

apt-get install -y curl mysql-server mysql-client nginx php5-fpm php5-cgi php5-cli imagemagick php5-intl php5-xsl php5-mysql php5-curl php5-gd php5-pgsql git;

Get ez

cd /var/www
git clone https://github.com/ezsystems/ezpublish-legacy.git ezpublish_legacy
cd ezpublish_legacy
git checkout v2015.01.3
@Alexnder
Alexnder / webdrive.md
Last active November 11, 2015 07:19
Windows Webdrive toolkit

WebDrive

Для работы по SFTP Нужен публичный и секретный ключ с паролем в формате OpenSSH magnet:?xt=urn:btih:DF57DF6D0B4836C469EABC6B0B16062B5143C5FC&dn=WebDrive%20V12.10.4082%20x32%20%26%20x64&tr=udp%3a%2f%2fopen.demonii.com%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.istole.it%3a80%2fannounce

Для отображения ошибки при сохранении файла

file Settings -> Basic file Options -> Test for Write Access when files are created

Проверять для файлов дату изменения

App Settings -> Cache -> Basic Cache Settings -> Cache Mode = Multi-user

Make link from C:\Users\user\.ssh to "C:\Program Files (x86)\Git\.ssh"
mklink /d "C:\Program Files (x86)\Git\.ssh" C:\Users\user\.ssh
@Alexnder
Alexnder / config.md
Last active August 29, 2015 14:18
Console Git Windows Install
Host host.com
HostName host.com
User git
IdentityFile ~/.ssh/id_rsa_host_git

Host host.com
HostName host.com
User ubuntu
IdentityFile ~/.ssh/id_rsa_host
@Alexnder
Alexnder / sshd_config.md
Last active August 29, 2015 14:18
sshd_config

nano /etc/ssh/sshd_config

Config to long live ssh sessions

TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 10

Restart

service ssh restart

@Alexnder
Alexnder / squid_conf.md
Last active August 29, 2015 14:18
Squid simple config with cache without auth on debian

install

apt-get install squid3

configure

nano /etc/squid3/squid.conf

config file

http_access allow all
http_port 3128

cache_dir ufs /var/spool/squid3 1024 16 256
@Alexnder
Alexnder / ssh.md
Last active September 16, 2017 22:21
ssh config remote private key access

Create keys

cd ~/.ssh/
ssh-keygen -t rsa
cp id_rsa.pub authorized_keys
chmod 700 .
chmod -R 600 ./*

If Server refused our key:

@Alexnder
Alexnder / nginx.md
Last active September 10, 2015 07:50

Tips for ngix config

nano /etc/nginx/nginx.conf

worker_processes 1;    # Number of cores
server_tokens off;     # Disable show version

Best performance

nano /etc/php5/fpm/pool.d/www.conf