#Mac OS X
| /** | |
| * Fallback to localStorage | |
| **/ | |
| ;(function() { | |
| if (typeof localStorage == "undefined" && typeof FileSystem == "function") { | |
| var fileSyObj = new FileSystem(); | |
| var fileName = curWidget.id + "_localStorage.db"; | |
| var lStorage = {}; | |
| var changed = false; |
| # -*- coding: utf-8 -*- | |
| import alfred | |
| import calendar | |
| import time | |
| import math | |
| from delorean import utcnow, parse, epoch | |
| # global var to see if user | |
| # has a time offset |
| define accounts::virtual ($uid,$realname,$pass,$sshkeytype,$sshkey) { | |
| include accounts::params | |
| # Pull in values from accounts::params | |
| $homepath = $accounts::params::homepath | |
| $shell = $accounts::params::shell | |
| # Create the user | |
| user { $title: | |
| ensure => 'present', |
Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.
As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.
- Generate a ssh key
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config to:
| sdb connect <ip>:<port> # connect to TV | |
| sdb -s <deviceName> capability # get <installationPath> | |
| # build | |
| tizen cli-config "default.profiles.path=<profile_path>" | |
| tizen build-web -out .buildResult -- <source-dir> | |
| tizen package --type wgt --sign profileName -- <source-dir>/.buildResult # extract <package-file> | |
| mv <package-file> . | |
| rm -rf <source-dir>/.buildResult |
This is largely based off of this article by Hulu and their roku-dev-cli tool.
Requirements:
The main requirement is a Mac with 2 available network interfaces WIFI <-> WIFI, LAN <-> WIFI, etc. This should work on other platforms as well but isn't covered here.
Setup
The first thing we need is Homebrew. If you've never used it before it's a great package manager for macOS that makes installing programs easier. Open Terminal and paste
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and hit enter
At WWDC 2019 on June 3, 2019, starting with macOS Catalina (10.15), the macOS will use zsh as default shell across the operating system. Besides, Bash is still available along with the new zsh; however, by setting zsh as the default shell, Apple does force you to move to the new platform.
virtualenvwrapper is a set of extensions to the original virtualenv which is a tool for creating isolated virtual Python environments. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies. According to the virtualenvwrapper docs, there are some noteworthy features such as:
- Organizes all your virtual environments in one place.
- Wrappers for managing your virtual environments (create, delete, copy).
- Use a single command to switch between environments.