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 echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
$ sudo add-apt-repository ppa:webupd8team/java | |
$ sudo apt-get update | |
$ sudo apt-get install oracle-java7-installer | |
$ java -version | |
If 1.7.0 will not be displayed: | |
$ sudo update-java-alternatives -s java-7-oracle |
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
import hotshot | |
import os | |
import time | |
from django.conf import settings | |
try: | |
PROFILE_LOG_BASE = settings.PROFILE_LOG_BASE | |
except: | |
PROFILE_LOG_BASE = "/tmp" | |
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
#!/usr/bin/env python | |
# coding=utf-8 | |
# | |
# @file gevent_zmq_redis_demo.py | |
# @author kaka_ace <[email protected]> | |
# @date Tue Oct 14 2014 | |
""" | |
fetures: there are two concurrent tasks | |
1. From Redis server, Getting the notify msg with BLPOP operation, |
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 add-apt-repository -y ppa:nginx/stable | |
$ sudo apt-get update | |
$ cat /etc/apt/sources.list.d/nginx-stable-trusty.list | |
deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main | |
deb-src http://ppa.launchpad.net/nginx/stable/ubuntu trusty main | |
$ sudo apt-get update | |
$ sudo apt-get install -y dpkg-dev | |
$ sudo mkdir /opt/rebuildnginx |
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 | |
sudo apt-get update | |
if which raspi-config >/dev/null; then | |
sudo apt-get upgrade | |
fi | |
sudo apt-get -y install build-essential cmake git pkg-config python-dev | |
sudo apt-get -y install libjpeg-dev libtiff5-dev libjpeg8-dev libjasper-dev libpng12-dev | |
sudo apt-get -y install libgtk2.0-dev | |
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev | |
sudo apt-get -y install libatlas-base-dev gfortran libxvidcore-dev libx264-dev |
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 | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:george-edison55/cmake-3.x | |
sudo apt-get update | |
sudo apt-get install cmake libgtk2.0-dev libspeexdsp-dev \ | |
libavcodec-dev libswscale-dev libx11-dev libxv-dev libgl1-mesa-dev \ | |
libglew1.6-dev libv4l-dev libxml2-dev libtool automake intltool | |
sudo apt-get install libantlr3c-dev pkg-config libantlr3c-dev antlr3 g++ make | |
sudo apt-get install libreadline-dev libgsm1-dev libtheora-dev \ | |
libsqlite3-dev libupnp6-dev libsrtp-dev |
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
/* | |
Load Sinon.JS in the SpecRunner: | |
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine.js"></script> | |
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine-html.js"></script> | |
<script type="text/javascript" src="sinon-1.0.0.js"></script> | |
<script type="text/javascript" src="sinon-ie-1.0.0.js"></script> | |
http://cjohansen.no/sinon/ | |
*/ | |
describe("SinonFakeServerWithJasmine", function() { |
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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 2048 |
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/bash | |
echo "This is a idle script (infinite loop) to keep container running." | |
echo "Please replace this script." | |
cleanup () | |
{ | |
kill -s SIGTERM $! | |
exit 0 | |
} |
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
Ext.define('Ext.enhance.data.Store', { | |
override: 'Ext.data.Store', | |
constructor: function(config) { | |
var me = this; | |
me.callParent([config]); | |
me.on({ | |
'beforeload': function(store, operation) { | |
// keep the operation which has request object | |
store.lastOperation = operation; | |
} |
OlderNewer