Skip to content

Instantly share code, notes, and snippets.

View pauricthelodger's full-sized avatar

Padraic Harley pauricthelodger

View GitHub Profile
@Samffy
Samffy / xps13.md
Last active October 31, 2024 16:13
Dell XPS 13 9360 : Ubuntu Wifi disconnection

I encounter wifi disonnection problem on a Dell XPS 13 9360. Here is the solution I used to fix this bad behavior.

Which wifi card version is installed ?

lspci | grep -i net

3a:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

@frank-dspeed
frank-dspeed / 2018-https-localhost.md
Last active February 4, 2025 17:41 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

Create a own domain (1-10 Domains No Wildcards)

edit /etc/hosts add my.

@smparekh
smparekh / config.fish
Last active May 10, 2022 16:52
Using CodeArtifact as Pypi mirror for Pipenv
set -x AWS_PROFILE default # replace
set -x AWS_REGION us-east-1 # replace
set -x CODEARTIFACT_DOMAIN foo # replace
set -x CODEARTIFACT_DOMAIN_ID 123456789 # replace
set -x CODEARTIFACT_REPOSITORY somepypi # replace
function codeartifact_login
set -Ux CODEARTIFACT_TOKEN (aws --profile $AWS_PROFILE codeartifact get-authorization-token --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_ID --query authorizationToken --output text)
set -Ux PIPENV_PYPI_MIRROR "https://aws:$CODEARTIFACT_TOKEN@$CODEARTIFACT_DOMAIN-$CODEARTIFACT_DOMAIN_ID.d.codeartifact.$AWS_REGION.amazonaws.com/pypi/$CODEARTIFACT_REPOSITORY/simple/"
end
@judy2k
judy2k / sometimes.py
Last active April 28, 2025 23:11
A descriptor that wraps a method that can be called on a class or an instance.
from functools import wraps
class SometimesClassmethod:
def __init__(self, wrapped_function):
self._wrapped = wrapped_function
def __get__(self, instance, owner=None):
if instance is None:
return self._class_call(owner)