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
upstream nodejs { | |
server localhost:3000; | |
} | |
server { | |
listen 8080; | |
server_name localhost; | |
root ~/workspace/test/app; | |
location / { |
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
# ref http://stackoverflow.com/questions/3297196/how-to-set-up-a-squid-proxy-with-basic-username-and-password-authentication | |
# first install apache: | |
# $ sudo apt-get install -y apache2-utils | |
# add these five lines to /etc/squid3/squid.conf | |
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords | |
auth_param basic realm proxy | |
acl authenticated proxy_auth REQUIRED | |
http_access allow authenticated | |
http_port 3128 # or whatever you like |
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
git clone <url to origin repo> temp-dir | |
git branch -a | |
git checkout branch-name | |
git fetch --tags | |
git tag | |
git branch -a | |
git remote rm origin | |
git remote add origin <url to NEW repo> | |
git push origin --all | |
git push --tags |
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
# tar -xvf rkhunter-1.4.6.tar.gz | |
# cd rkhunter-1.4.6 | |
# ./installer.sh --layout default --install | |
# /usr/local/bin/rkhunter --update | |
# /usr/local/bin/rkhunter --propupd | |
# rkhunter --check |
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
> use admin | |
> db.adminCommand({setParameter: 1, internalQueryExecMaxBlockingSortBytes:100151432}) |
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
# vim /etc/systemd/system/myservice.service | |
[Unit] | |
Description=myservice-description | |
After=network.target | |
[Service] | |
ExecStart=/opt/myservice-location/src/node/server.js | |
Restart=always | |
User=me | |
Group=group |
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 | |
pm2 start /usr/bin/binary --name instance_name --interpreter none -x -- args |
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
[ | |
{ "keys": ["f12"], "command": "htmlprettify"}, | |
{ "keys": ["f1"], "command": "fold" }, | |
{ "keys": ["f2"], "command": "unfold" }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, | |
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, |
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 | |
sudo mv ~/path/to/fonts /usr/share/fonts/ | |
sudo fc-cache -f -v |
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
# uncomment START_DAEMON=true in /etc/default/elasticsearch |