Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.
To reset and disable not used modes on Yubikey you need the ykman
program
You can install it using those commands
eval $(echo "no:global default;fi:normal file;di:directory;ln:symbolic link;pi:named pipe;so:socket;do:door;bd:block device;cd:character device;or:orphan symlink;mi:missing file;su:set uid;sg:set gid;tw:sticky other writable;ow:other writable;st:sticky;ex:executable;"|sed -e 's/:/="/g; s/\;/"\n/g') | |
{ | |
IFS=: | |
for i in $LS_COLORS | |
do | |
echo -e "\e[${i#*=}m$( x=${i%=*}; [ "${!x}" ] && echo "${!x}" || echo "$x" )\e[m" | |
done | |
} |
""" | |
* name file something like zypper_up.py | |
* copy into ~/.config/py3status/modules/ | |
* edit i3status conf file | |
*Ctl+Shift+r | |
""" | |
import subprocess | |
import re | |
#!/bin/bash | |
# Retrieves image configuration using | |
# private registries without authentication | |
set -o errexit | |
# Address of the registry that we'll be | |
# performing the inspections against. | |
# This is necessary as the arguments we |
#!/bin/bash | |
export ZYPP_MEDIANETWORK=1 | |
export ZYPP_SINGLE_RPMTRANS=1 | |
zypper ref && zypper dup |
Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.
To reset and disable not used modes on Yubikey you need the ykman
program
You can install it using those commands
from ocw.lib.gce import GCE | |
from webui.settings import PCWConfig | |
from tests.generators import min_image_age_hours, max_image_age_hours, gce_max_service_account_age_hours, gce_min_service_account_age_hours | |
from tests.generators import mock_get_feature_property | |
from tests import generators | |
from datetime import datetime, timezone, timedelta | |
import googleapiclient.discovery | |
from googleapiclient.http import HttpMock | |
from googleapiclient.http import HttpMockSequence | |
import json |
from .vault import GCECredential | |
from .provider import Provider, Image | |
import googleapiclient.discovery | |
from google.oauth2 import service_account | |
from dateutil.parser import parse | |
from .decorators import filterService | |
from googleapiclient.errors import HttpError | |
import re | |
{'keys': [{'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]/keys/c718317203fdacf1833db761b45c0a8beb6f7bbd', 'validAfterTime': '2021-12-12T11:25:04.835862+00:00'}, {'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]/keys/c718317203fdacf1833db761b45c0a8beb6f7bbd', 'validAfterTime': '2021-12-12T11:25:04.835862+00:00'}, {'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]/keys/c718317203fdacf1833db761b45c0a8beb6f7bbd', 'validAfterTime': '2021-12-13T08:25:04.835889+00:00'}, {'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]/keys/c718317203fdacf1833db761b45c0a8beb6f7bbd', 'validAfterTime': '2021-12-12T11:25:04.835862+00:00'}, {'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]/keys/c718317203fdacf1833db761b45c0a8beb6f7bbd', 'validAfterTime': '2021-12-12 |
{'accounts': [{'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]', 'email': '[email protected]'}, {'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]', 'email': '[email protected]'}, {'name': 'projects/suse-sle-qa/serviceAccounts/[email protected]', 'email': '[email protected]'}]} |
from ocw.lib.gce import GCE | |
from webui.settings import PCWConfig | |
from tests.generators import min_image_age_hours, max_image_age_hours, gce_max_service_account_age_hours, gce_min_service_account_age_hours | |
from tests.generators import mock_get_feature_property | |
from tests import generators | |
from datetime import datetime, timezone, timedelta | |
import googleapiclient.discovery | |
from googleapiclient.http import HttpMock | |
from googleapiclient.http import HttpMockSequence | |
from googleapiclient.discovery import build |