Skip to content

Instantly share code, notes, and snippets.

View rayluo's full-sized avatar

Ray Luo rayluo

View GitHub Profile
demaniak / Dockerfile
Created April 24, 2020 06:55
Run Microsoft teams in docker on linux
View Dockerfile
FROM ubuntu
RUN apt-get update && \
apt-get install -y curl apt-utils \
libasound2 libatk-bridge2.0-0 libcairo2 libcups2 libgdk-pixbuf2.0-0 \
libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 \
libsecret-1-0 libx11-xcb1 libxcomposite1 libxcomposite1 \
libxss1 apt-transport-https libxkbfile1
COPY teams.deb /tmp/teams.deb
althonos / setup.cfg
Last active October 31, 2023 04:52
A `setup.cfg` template for my Python projects
View setup.cfg
name = {name}
version = file: {name}/_version.txt
author = Martin Larralde
author_email =
url ={name}
description = {description}
long_description = file:
gene1wood /
Last active June 12, 2023 02:24
Analysis of PyPi package names and the use of dashes underscores upper and lower case
import xmlrpclib
except ImportError:
import xmlrpc.client as xmlrpclib
client = xmlrpclib.ServerProxy('')
packages = client.list_packages()
total = len(packages)
dashes = len([x for x in packages if '-' in x])
diewland / n10_hdmi_resolution.txt
Created June 16, 2016 04:44
Nexus 10 change resolution script for fix hdmi problem
View n10_hdmi_resolution.txt
# ----------------
# (require root)
# reset
wm size reset
wm density reset
wm overscan reset
erikbern /
Last active November 13, 2023 12:17
How to use a .pfx file with Python requests – also works with .p12 files
import contextlib
import OpenSSL.crypto
import os
import requests
import ssl
import tempfile
def pfx_to_pem(pfx_path, pfx_password):
''' Decrypts the .pfx file to be used with requests. '''
jpf /
Last active August 4, 2023 16:58
JWTs signed with RS256 in Python: A demonstration of org-babel


This is a guide to using pyjwt to sign and validate a JWT using RS256.

The trickiest part of doing this is knowing what the proper OpenSSL commands are to generate the RSA keypair. I demonstrate that below.

Generating RSA keys

iMilnb /
Last active October 19, 2022 09:15
Programmatically manipulate AWS resources with boto3 - a quick hands on

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
JamesMGreene /
Last active November 29, 2023 12:59
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.


gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

gitaarik /
Last active December 4, 2023 18:29
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
tomdeboer / for_me_on_github.html
Last active April 3, 2021 05:09 — forked from matthua/main.html
Show a "Fork me on Github" banner on the top right corner. With z-index.
View for_me_on_github.html
<a href=""><img style="position: absolute; top: 0; right: 0; border: 0; z-index:100;" src="" alt="Fork me on GitHub"></a>