- Install meteor
meteor build my_app
(inside app folder)- Move the tar in a web folder and untar it
- Change /etc/nginx/my_app.com to proxypass to localhost:3000
- Reload nginx
- Install node and mongodb(binary)
- Start mongod with --smallfiles and &(or screen)
./mongod --smallfiles --fork --logpath /var/log/mongod.log
- move in bundle folder
- Install the app
(cd programs/server && npm install)
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
<div style='position: relative; padding-bottom: 81%; height: 0; overflow: hidden;'> | |
<iframe id='iframe' src='http://flickrit.com/slideshowholder.php?height=80&size=big&setId=72157648831623920&caption=true&trans=1&theme=1&thumbnails=1&transition=0&layoutType=responsive&sort=0' scrolling='no' frameborder='0'style='width:100%; height:100%; position: absolute; top:0; left:0;' ></iframe> | |
</div> |
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
float f=... | |
if (*(int*)&f & 0x7FFFFFFF) { | |
*(int*)&f += n << 23; | |
} |
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
server { | |
listen 80 default_server; | |
server_name mtgfiddle.me; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
access_log /var/log/nginx/access_log combined; |
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
sudo apt-get install build-essential python-dev libmysqlclient-dev | |
sudo pip install virtualenv | |
mkdir dbfiller | |
cd dbfiller/ | |
virtualenv env | |
# env/bin/pip install MySQL-python #best for now to use sqlite3 | |
chmod -R a+rx var/log/nginx/ |
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
rsync -ah --progress source destination |
In screen the terminal multiplexer.
- new session
screen -S NewSession
- switch between sessions
ctrl
a
thenn
- detach to the current session
ctrl
a
thend
- list screens
screen -ls
- attach to an attached session
screen -x pidOfSession
- delete detached session
screen -X -S pidOfSession quit
- To split vertically:
ctrl
a
then |. - To split horizontally:
ctrl
a
thenS
(uppercase one). - To unsplit:
ctrl
a
thenQ
(uppercase one).
Flush RAM and buffers
free && sync && echo 3 > /proc/sys/vm/drop_caches && free
Get process who are consuming RAM
ps aux --sort -rss
Get process tree
ps axjf
Kill process by name
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 to_send = {} | |
to_send.title = "title"; | |
to_send.content = "content"; | |
to_send.author = "aut"; | |
to_send.language = "css"; | |
to_send = JSON.stringify(to_send); | |
var request = new XMLHttpRequest(); | |
request.open('POST', 'http://localhost:3000/api/v1/new', true); | |
request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); |
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
2015-06-29 |
OlderNewer