#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.
相对来说shadowsock则灵活得多.
#解决方案 shadowsock + Privoxy
思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.
<?php | |
use Symfony\Component\Yaml\Yaml; | |
return Yaml::parse(file_get_contents(base_path().'/resources/lang/zh_cn/validation.yml')); |
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.
相对来说shadowsock则灵活得多.
#解决方案 shadowsock + Privoxy
思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.
echo "$(echo '0 3 * * * /usr/bin/docker system prune -f' ; crontab -l)" | crontab - |
defmodule KV.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :kv, | |
version: "0.1.0", | |
elixir: "~> 1.3", | |
build_embedded: Mix.env == :prod, | |
start_permanent: Mix.env == :prod, | |
deps: deps()] |
app.info_plist['UIStatusBarStyle'] = 'UIStatusBarStyleBlackTranslucent' | |
app.info_plist["UIViewControllerBasedStatusBarAppearance"] = false |
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
# -*- coding: utf-8 -*- | |
__all__ = ["DB", ] | |
import contextlib | |
import psycopg2 | |
from psycopg2 import extensions | |
from gevent.socket import wait_read, wait_write |
import unittest | |
from flask.ext.testing import TestCase | |
from testconfig import TestConfig | |
from admin import app | |
from admin.urls import url_routes | |
from init_app import create_app | |
from extensions import db | |
def assertCreate(models): |