I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
import sys | |
import gevent | |
from gevent.monkey import patch_all; patch_all() | |
from gevent import server, event, socket | |
from multiprocessing import Process, current_process, cpu_count | |
""" | |
Simple multiprocess StreamServer that proxies messages between clients. | |
Avoids using a multiprocessing.Event since it blocks on a semaphore. |
import re | |
from scrapy.link import Link | |
from urlparse import urljoin | |
from BeautifulSoup import BeautifulSoup | |
class SoupLinkExtractor(object): | |
def __init__(self, *args, **kwargs): | |
super(SoupLinkExtractor, self).__init__() | |
allow_re = kwargs.get('allow', None) |
// | |
// ARC Helper | |
// | |
// Version 2.2 | |
// | |
// Created by Nick Lockwood on 05/01/2012. | |
// Copyright 2012 Charcoal Design | |
// | |
// Distributed under the permissive zlib license | |
// Get the latest version from here: |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
import asyncio | |
import aiohttp | |
import bs4 | |
import tqdm | |
@asyncio.coroutine | |
def get(*args, **kwargs): | |
response = yield from aiohttp.request('GET', *args, **kwargs) | |
return (yield from response.read_and_close(decode=True)) |
//The calculations are coming from [here](https://gist.github.com/d-ronnqvist/11266321) (thanks David!) | |
- (void)updateAnimations | |
{ | |
CGFloat duration = self.duration * (1.f - [[self.progressLayers firstObject] strokeEnd]); | |
CGFloat strokeEndFinal = 1.f; | |
for (CAShapeLayer *progressLayer in self.progressLayers) | |
{ | |
POPBasicAnimation *popEndAnimation = [POPBasicAnimation animation]; |
如果Mac 上没有安装brew。先安装:ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
首先安装jenkins #: brew install jenkins brew 官网:http://brew.sh 或直接从Jenkins下载:http://jenkins-ci.org | |
本地Xcode 工程设置: | |
安装完成后浏览器打开:http://localhost:8080 Jenkins 默认地址 | |
首先请确认本地的xcode 工程是否能生成ipa 最好先试一次。如果xcode 能正常生成ipa 那么下面的才能实现 | |
第一步:编译ios 工程首先需要安装Xcode Plugin | |
1 选择左边的Manage Jenkins--> Manage Plugins --> Available -->Xcode integration |