Skip to content

Instantly share code, notes, and snippets.

View likair's full-sized avatar
🇫🇮

Likai R. likair

🇫🇮
View GitHub Profile
# -*- coding: utf-8 -*-
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.x509.oid import NameOID
import datetime
import uuid
import io
import selectors
import subprocess
import sys
def capture_subprocess_output(subprocess_args):
# Start subprocess
# bufsize = 1 means output is line buffered
# universal_newlines = True is required for line buffering
process = subprocess.Popen(subprocess_args,
@so0k
so0k / kubectl.md
Last active February 4, 2025 17:16
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 9, 2025 14:04
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:08
深入理解 Python 异步编程(上)

原文:Python开发者

(点击上方蓝字,快速关注我们)

来源:阿驹的自荐投稿(微信公号:驹说码事) 

如有好文章投稿,请点击 → 这里了解详情

前言

@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active April 24, 2025 02:56
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@rowland007
rowland007 / MergeVsRebase.md
Created April 19, 2019 09:45
Describes the differences between git merge and git rebase and when you should use them.

In our project’s Git repository, two branches currently exist: the usual master branch, and a feature branch that we created right after the initial commit. On the master branch, we have italicized the ‘a’, then bolded the ‘a’. On our feature branch, we have italicized the ‘b’, and then bolded the ‘b’.

image

Merge

By merging feature into master, master obtains a new commit — a “merge commit”.

image

@prologic
prologic / LearnGoIn5mins.md
Last active February 12, 2025 06:52
Learn Go in ~5mins
@ivan
ivan / List of countries that Zenni Optical (zennioptical.com) ships to, but refuses to list in its FAQ.txt
Last active February 7, 2024 00:31
List of countries that Zenni Optical (zennioptical.com) ships to, but refuses to list in its FAQ
<option value="US">United States</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="BE">Belgium</option>
<option value="BA">Bosnia and Herzegowina</option>
<option value="BG">Bulgaria</option>
<option value="CA">Canada</option>
<option value="CN">China</option>
@minhanhhere
minhanhhere / Instruction.md
Last active April 9, 2025 15:15
Customise Your Terminal Using Zsh & powerlevel10k

What we will setup

1. ZSH

ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes.

2. oh-my-zsh

This is a framework for zsh

3. Powerlevel 10k

Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.