Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| mkdir /etc/ssl/nginx | |
| wget -P /etc/ssl/nginx/ https://cs.nginx.com/static/files/CA.crt | |
| ## move nginx-repo.crt to /etc/ssl/nginx/nginx-repo.crt | |
| ## move nginx-repo.key to /etc/ssl/nginx/nginx-repo.key | |
| wget http://nginx.org/keys/nginx_signing.key | |
| apt-key add nginx_signing.key | |
| apt-get install apt-transport-https libgnutls26 libcurl3-gnutls | |
| printf "deb https://plus-pkgs.nginx.com/ubuntu `lsb_release -cs` nginx-plus\n" >/etc/apt/sources.list.d/nginx-plus.list |
| -- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor | |
| -- (Or export to .app to run from spotlight.) | |
| -- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password | |
| -- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility | |
| -- 4. Enable Applescript Editor and System UI Server (or for this .app if so exported) | |
| -- 5. Trigger script from the menu (or run from spotlight) | |
| -- 6. Enjoy being connected | |
| -- 7. Run script again to close connection | |
| # applescript | |
| # add login item | |
| osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}' | |
| # delete login item | |
| osascript -e 'tell application "System Events" to delete login item "itemname"' | |
| # list loginitems | |
| osascript -e 'tell application "System Events" to get the name of every login item' |
| #!/usr/bin/env bash | |
| deliver_target=([email protected] [email protected]) | |
| smtp_account="[email protected]" | |
| smpt_password="******" | |
| issue_archive_dir="/srv/ebook-deliver/archives" | |
| issue_name="solidot-$(date +%Y%m%d)" |
Asynchronous programming can be tricky for beginners, therefore I think it's useful to iron some basic concepts to avoid common pitfalls.
For an explanation about generic asynchronous programming, I recommend you one of the [many][2] [resources][3] [online][4].
I will focus on solely on asynchronous programming in [Tornado][1]. From Tornado's homepage:
This article is now published on my website: Prefer Subshells for Context.
| class Backend(object): | |
| def __init__(self): | |
| engine = create_engine("mysql://{0}:{1}@{2}/{3}".format(options.mysql_user, options.mysql_pass, options.mysql_host, options.mysql_db) | |
| , pool_size = options.mysql_poolsize | |
| , pool_recycle = 3600 | |
| , echo=options.debug | |
| , echo_pool=options.debug) | |
| self._session = sessionmaker(bind=engine) | |
| @classmethod |
| (function () { | |
| var g = void 0, | |
| k = !0, | |
| m = null, | |
| o = !1, | |
| p, q = this, | |
| r = function (a) { | |
| var b = typeof a; | |
| if ("object" == b) if (a) { | |
| if (a instanceof Array) return "array"; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import urllib2 | |
| gh_url = 'https://api.github.com' | |
| req = urllib2.Request(gh_url) | |
| password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |