Install wsl-open:
sudo npm install -g wsl-open
Update alternatives for xdg-open:
| # gcloud iam roles list | |
| --- | |
| description: Ability to view or act on access approval requests and view configuration | |
| etag: AA== | |
| name: roles/accessapproval.approver | |
| stage: GA | |
| title: Access Approval Approver | |
| --- | |
| description: Ability to update the Access Approval configuration | |
| etag: AA== |
Install wsl-open:
sudo npm install -g wsl-open
Update alternatives for xdg-open:
| #!/bin/sh | |
| if uname -r | \grep -q Microsoft ; then | |
| echo "WSL" | |
| else | |
| echo "non WSL" | |
| fi |
| javascript: | |
| var text = document.createElement('div'); | |
| text.appendChild(document.createElement('pre')).textContent = '[' + document.title + ']( ' + location.href + ' )'; | |
| document.body.appendChild(text); | |
| document.getSelection().selectAllChildren(text); | |
| document.execCommand('copy'); | |
| document.body.removeChild(text); |
| <!doctype html> | |
| <html> | |
| <body> | |
| <script> | |
| const isChrome = navigator.userAgent.toLowerCase().indexOf("chrome") !== -1; | |
| const isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; | |
| console.log(`isChrome: ${isChrome}`); | |
| console.log(`isFirefox: ${isFirefox}`); | |
| </script> |
| diff -u org_voluptuous-0.8.8/voluptuous-0.8.8/setup.py modified_voluptuous-0.8.8/voluptuous-0.8.8/setup.py | |
| --- org_voluptuous-0.8.8/voluptuous-0.8.8/setup.py 2015-12-15 23:10:46.000000000 +0900 | |
| +++ modified_voluptuous-0.8.8/voluptuous-0.8.8/setup.py 2016-01-01 15:50:05.766400230 +0900 | |
| @@ -1,3 +1,4 @@ | |
| +from __future__ import with_statement | |
| try: | |
| from setuptools import setup | |
| except ImportError: | |
| diff -u org_voluptuous-0.8.8/voluptuous-0.8.8/voluptuous.py modified_voluptuous-0.8.8/voluptuous-0.8.8/voluptuous.py | |
| --- org_voluptuous-0.8.8/voluptuous-0.8.8/voluptuous.py 2015-12-15 23:10:46.000000000 +0900 |
| #!/bin/bash | |
| function date_wrapper() { | |
| command="date --rfc-3339=$1" | |
| echo "$ ${command}" | |
| echo -e "`${command}`\n" | |
| } | |
| #!/bin/bash | |
| function date_wrapper() { | |
| command="date --iso-8601=$1" | |
| echo "$ ${command}" | |
| echo -e "`${command}`\n" | |
| } | |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| """ | |
| Sample program to read a CSV file. | |
| This works for both Python 2/3. | |
| """ | |
| from __future__ import print_function | |
| from __future__ import unicode_literals |