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
CREATE DATABASE `tera_site` CHARACTER SET utf8 COLLATE utf8_general_ci; |
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
wget -qO- https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz | sudo tar xvz -C /usr/local/ | |
/etc/profile: | |
export GOROOT=/usr/local/go | |
export GOPATH=/go | |
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin |
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
# when uncommented gin.SetMode(gin.ReleaseMode) | |
ernado@node:/go/src/github.com/ernado/webrtc-chat$ ./webrtc-chat | |
[GIN] 2014/10/22 - 01:18:45 | 200 | 13.65133ms | 127.0.0.1:43140 GET / | |
[GIN] 2014/10/22 - 01:18:46 | 404 | 4.621us | 127.0.0.1:43146 GET /realtime | |
# when commended (in debug mode) | |
ernado@node:/go/src/github.com/ernado/webrtc-chat$ ./webrtc-chat | |
[GIN-debug] GET / --> main.func·002 (3 handlers) | |
[GIN-debug] GET /static/*filepath --> github.com/gin-gonic/gin.func·005 (3 handlers) | |
[GIN-debug] HEAD /static/*filepath --> github.com/gin-gonic/gin.func·006 (3 handlers) |
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
I/ActivityManager( 1504): Timeline: Activity_launch_request id:ru.cafe time:171920024 | |
I/ActivityManager( 999): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ru.cafe/.MapActivity} from pid 1504 | |
D/dalvikvm( 999): GC_FOR_ALLOC freed 3965K, 13% free 90785K/103736K, paused 103ms, total 103ms | |
D/SonySWEffect( 303): PARAM_CA_CHSEP Clear Stereo Off(0x80000001) | |
D/dalvikvm(27099): Late-enabling CheckJNI | |
I/ActivityManager( 999): Start proc ru.cafe for activity ru.cafe/.MapActivity: pid=27099 uid=10276 gids={50276, 3003, 1028, 1015} | |
D/SonySWEffect( 303): Unsupported frame count 240 | |
D/audio_hw_primary( 303): select_devices: out_snd_device(35: speaker) in_snd_device(0: ) | |
D/hardware_info( 303): hw_info_append_hw_type : device_name = speaker | |
D/ACDB-LOADER( 303): ACDB -> send_audio_cal, acdb_id = 15, path = 0 |
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 poputchiki { | |
server msk1.cydev.ru:3000; | |
keepalive 16; | |
} | |
upstream render { | |
server msk1.cydev.ru:9111; | |
keepalive 16; | |
} |
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
# http://nginx.org/download/nginx-1.5.10.tar.gz | |
FROM ubuntu:raring | |
MAINTAINER Alexandr Razumov [email protected] | |
# base for nginx spdy | |
RUN sed -i 's/archive.ubuntu.com/mirror.yandex.ru/g' /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install wget make build-essential zlib1g-dev libpcre3 libpcre3-dev libbz2-dev libssl-dev -y | |
ENV NGINX_VER 1.5.10 | |
RUN wget http://nginx.org/download/nginx-$NGINX_VER.tar.gz -nv | |
RUN tar -xf nginx-$NGINX_VER.tar.gz |
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
# coding=utf-8 | |
# python 2.7.6 | |
# Alexander Razumov (ernado) | |
# с подсветкой кода: https://gist.github.com/ernado/8870444#file-check-py | |
""" | |
1. e-mail состоит из имени и доменной части, эти части разделяются символом "@"; | |
2. доменная часть не короче 3 символов и не длиннее 256, является набором непустых строк, состоящих из символов a-z 0-9_- и разделенных точкой; |
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
# ... | |
def initialize(jid, send=True): | |
""" | |
Initializes user by subscribing to friends and sending initial presence | |
@type jid: unicode | |
@param jid: client jid | |
@param send: send presence flag | |
""" | |
logger.debug("user api: called init for user %s" % jid) |
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
if not hasattr(sys, "argv") or not sys.argv[0]: | |
sys.argv = ["."] | |
try: | |
__file__ = os.path.dirname(os.path.abspath(sys.argv[0])) | |
os.chdir(__file__) | |
except OSError: | |
print "#! Incorrect launch!" | |
time.sleep(6) |
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 | |
# | |
# Installs texlive + scipy + pypy requirements | |
# Ubuntu 13.10, by ernado | |
# Requires ~3.5 GB of free space | |
# for mongodb | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list |