Files for kubernetes/kubernetes#73541
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Abstract Base Classes compatible with Python 2 and 3. | |
# https://www.reddit.com/r/learnpython/comments/5duj7z/started_my_first_python_project_ever_need_help/ | |
import abc | |
ABC = abc.ABCMeta('ABC', (object,), {}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
from configparser import RawConfigParser, NoOptionError | |
from itertools import chain | |
import argparse | |
def strip_quotes(s): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# https://www.reddit.com/r/Python/comments/6sx3xk/variable_being_treated_locally_when_should_be/ | |
from __future__ import print_function | |
def Ocean(fake_argument_to_keep_the_signature_the_same): | |
from os import path # line 2 | |
global path # line 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For every user with membership in an Active Directory group, | |
# ... create a vSphere Resource Pool named after the user | |
# ... give that user permissions to the resource pool and its childen. | |
Connect-VIServer vcsa-01a.corp.local | |
$poweruser = Get-VIRole "VirtualMachinePowerUser" | |
$adusers = Get-ADGroupMember "VMPowerUsers" | |
$newuserpool = Get-ResourcePool "NewUsers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# I had a pile of http://fav.me/... urls in a text file, and wanted to retrieve the original files via OEMBED. | |
from urllib.parse import quote | |
from urllib.request import urlopen, urlretrieve | |
import json | |
import sys | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
The JetBrains Toolbox app fetches (xz-compressed) json feeds inside ASN.1 signedData. | |
Retrieve the feed and locate the direct download url for the latest PyCharm Community Edition. | |
""" | |
from __future__ import print_function | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# https://www.reddit.com/r/Python/comments/7v9kse/filesocket_descriptor_share_across_process/ | |
# >>> hi, can we send a file/socket descriptor (with access and permissions) from one process to another ? | |
# >>> I mean not by forking but when process are already created . | |
""" | |
Demonstrate sending an open file descriptor between a pair of processes, the recipient of | |
which will read the file contents, depite not having permission to open(..., 'r') the file. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reki:tmp alan$ git clone https://github.com/alanjcastonguay/azure-iot-sdk-python.git reproduction-alanjcastonguay-azure-iot-sdk-python.git | |
Cloning into 'reproduction-alanjcastonguay-azure-iot-sdk-python.git'... | |
remote: Counting objects: 37657, done. | |
remote: Compressing objects: 100% (9/9), done. | |
remote: Total 37657 (delta 2), reused 9 (delta 2), pack-reused 37646 | |
Receiving objects: 100% (37657/37657), 39.81 MiB | 1.63 MiB/s, done. | |
Resolving deltas: 100% (22884/22884), done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Can a ServiceAccount in a namespace be given permissions to act in another namespace? | |
# Answer: Yes. A RoleBinding in one namespace can cite a ServiceAccount in *any* namespace. | |
### Test | |
# $ kubectl apply -f namespace-permission-test.yaml | |
### Manifests |
OlderNewer