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
using (var web = new WebClient()) | |
{ | |
web.Encoding = System.Text.Encoding.UTF8; | |
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); | |
} |
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
#!/bin/sh | |
unset GIT_DIR | |
cd /my/git/project/on/server && git pull origin master |
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
# generate public private key to avoid typing password every time | |
ssh-keygen -t rsa | |
scp ~/.ssh/id_rsa.pub user@address:id_rsa.tmp | |
ssh user@address | |
cat id_rsa.tmp >> .ssh/authorized_keys | |
exit | |
# local git initilization |
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
$ ssh-keygen -t rsa | |
$ scp ~/.ssh/id_rsa.pub [email protected]:id_rsa.tmp | |
$ ssh [email protected] | |
$ cat id_rsa.tmp >> .ssh/authorized_keys |
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
from gevent import monkey; monkey.patch_all() | |
from geventwebsocket.handler import WebSocketHandler | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask, request, render_template | |
import werkzeug.serving | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): |
NewerOlder