defaults write com.apple.screencapture location folder_name_here
Save screenshots to the 'Screenshots' folder (inside iCloud Drive)
defaults write com.apple.screencapture location ~/Library/Mobile\ Documents/com~apple~CloudDocs/Screenshots
| # !/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| __author__ = 'Diego Garcia' | |
| import tornado.web | |
| import tornado.ioloop | |
| import oauth2.tokengenerator | |
| import oauth2.grant | |
| import oauth2.store.redisdb | |
| import oauth2.store.mongodb |
| # Basic Strongswan ikev2 server setup | |
| * paltform: atlantic.net ubuntu 14.04 x64 | |
| * the commands below are run with root account | |
| ## Strongswan | |
| ``` | |
| apt-get install strongswan | |
| apt-get install iptables iptables-persistent | |
| ``` |
OS X Mountain Lion adds Notification Center for managing alerts. Just like growl, but better.
Safari 5.2 exposes HTML5 notifications API to sites. Every site need to have permission for showing notifications.
Specification is very new and completely different from older version Chrome has. Developer doesn't have to watch for complicated NotificationCenter.
The syntax is very simple:
| story_create | |
| add_story_label | |
| story_label_add | |
| remove_story_label | |
| story_label_remove | |
| comment_create | |
| comment_delete | |
| story_move_multi | |
| multi_story_delete | |
| story_delete_multi |
| class Application(tornado.web.Application): | |
| def __init__(self): | |
| tornado.web.Application.__init__(self, handlers, **settings) | |
| self.db_session = db_session | |
| self.redis = redis.StrictRedis() | |
| self.session_store = RedisSessionStore(self.redis) | |
| class BaseHandler(tornado.web.RequestHandler): |
| from tornado import ioloop | |
| from tornado import iostream | |
| import socket | |
| class Envelope(object): | |
| def __init__(self, sender, rcpt, body, callback): | |
| self.sender = sender | |
| self.rcpt = rcpt[:] | |
| self.body = body | |
| self.callback = callback |
| # | |
| # Test of experimental Tornado feature for a streaming request body handler, see | |
| # https://github.com/nephics/tornado/commit/1bd964488926aac9ef6b52170d5bec76b36df8a6 | |
| # | |
| # | |
| # Client sending file to server | |
| # | |
| import tornado.httpclient as httpclient |