Skip to content

Instantly share code, notes, and snippets.

View mylamour's full-sized avatar
✌️
Do the right thing

Mour mylamour

✌️
Do the right thing
View GitHub Profile
@mylamour
mylamour / A Practical Guide To Business Writing —— Words and Expressions.md
Created August 9, 2021 07:43
Reading Note A Practical Guide To Business Writing —— Words and Expressions

This is a reading note, hope it was helpful.

1. PRC Concept

Please keep it in your mind

  1. Purpose
    1. To Inform
    2. To Request
    3. To Persuade
  2. To Suggest or Recommend
import re
from github import Github
# First create a Github instance:
# using an access token
g = Github("")
# Github Enterprise with custom hostname
#!/bin/bash
mkdir -p RSAKeypairs SM2Keypairs AESKeypairs SM4Keypairs
for i in $(seq -w 0 40)
do
echo "No. $i"
echo "create 2048/Short RSA KEY"
openssl genrsa -out ./RSAKeypairs/sh_hsm_supplement_rsa_short_private_$i.pem 2048
@mylamour
mylamour / riot-matrix-workshop.md
Created December 31, 2020 03:57 — forked from attacus/riot-matrix-workshop.md
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@mylamour
mylamour / keybase.md
Last active December 31, 2020 01:13

Keybase proof

I hereby claim:

  • I am mylamour on github.
  • I am mour (https://keybase.io/mour) on keybase.
  • I have a public key ASCw9qkzP7Owrlg3QJsyewWb2sxjNJjTrDdlJpELSHRLOQo

To claim this, I am signing this object:

@mylamour
mylamour / pycurses.py
Created December 15, 2020 13:47 — forked from claymcleod/pycurses.py
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@mylamour
mylamour / tree.md
Created November 26, 2020 12:53 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@mylamour
mylamour / subprocess_pipe.md
Created November 26, 2020 09:03 — forked from waylan/subprocess_pipe.md
Writing to a python subprocess pipe

Here's a few things I tried to write output to a python subprocess pipe.

from subprocess import Popen, PIPE

p = Popen('less', stdin=PIPE)
for x in xrange(100):
    p.communicate('Line number %d.\n' % x)
@mylamour
mylamour / nef2jpg.py
Last active November 17, 2020 13:52
convert NEF file to jpeg
import os
import time
import rawpy
import click
import imageio
import argparse
from concurrent.futures import ProcessPoolExecutor
def neftojpeg(path):
@mylamour
mylamour / GIF-Screencast-OSX.md
Created May 9, 2020 09:13 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: