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
import sys
from PyQt6.QtCore import Qt, QRect
from PyQt6.QtGui import QPainter, QPen
from PyQt6.QtWidgets import QApplication, QMainWindow
class ScreenCapture(QMainWindow):
def __init__(self):
super().__init__()
self.start_pos = None
RUNPATH="$(
cd -- "$(dirname "$0")" >/dev/null 2>&1
pwd -P
)"
echo "$RUNPATH"
# Alice
rm -rf alice bob
mkdir -p alice/keys/ alice/texts/ bob/keys/
(?i)((access_key|access_token|admin_pass|admin_user|algolia_admin_key|algolia_api_key|alias_pass|alicloud_access_key|amazon_secret_access_key|amazonaws|ansible_vault_password|aos_key|api_key|api_key_secret|api_key_sid|api_secret|api.googlemaps AIza|apidocs|apikey|apiSecret|app_debug|app_id|app_key|app_log_level|app_secret|appkey|appkeysecret|application_key|appsecret|appspot|auth_token|authorizationToken|authsecret|aws_access|aws_access_key_id|aws_bucket|aws_key|aws_secret|aws_secret_key|aws_token|AWSSecretKey|b2_app_key|bashrc password|bintray_apikey|bintray_gpg_password|bintray_key|bintraykey|bluemix_api_key|bluemix_pass|browserstack_access_key|bucket_password|bucketeer_aws_access_key_id|bucketeer_aws_secret_access_key|built_branch_deploy_key|bx_password|cache_driver|cache_s3_secret_key|cattle_access_key|cattle_secret_key|certificate_password|ci_deploy_password|client_secret|client_zpk_secret_key|clojars_password|cloud_api_key|cloud_watch_aws_access_key|cloudant_password|cloudflare_api_key|cloudflare_auth_k
@mylamour
mylamour / how-to-use-mac-keychain-to-store-github-repos-credentials.md
Created April 13, 2022 03:50 — forked from nepsilon/how-to-use-mac-keychain-to-store-github-repos-credentials.md
How to use Mac KeyChain to store GitHub repos credentials? — First published in fullweb.io issue #108

How to use Mac KeyChain to store GitHub repos credentials?

You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.

Chances are you already have the git credential-osxkeychain command installed. If not, just install Git with brew: brew install git.

Once installed, just tell Git to use the KeyChain to store your credentials:

git config --global credential.helper osxkeychain
@mylamour
mylamour / taichi.html
Created October 23, 2021 06:38 — forked from ManiaciaChao/taichi.html
Draw a Taichi symbol with CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Taichi</title>
<style>
.taichi {
width: 400px;
height: 400px;

0x01 密码学基础

以下章节中的密码学基础部分的知识主要总结自《图解密码技术》读书笔记,图片系原文所载。有个朋友说这个是神书,我觉得大可不必,不过确切是本好书,因为能够帮助数学基础不是很好的读者快速了解密码学基础。

1. 受到的部分威胁和对应的密码技术

image

2. 基本的密码技术与常识

@mylamour
mylamour / 程序员的酒后真言及我的想法.md
Last active December 17, 2023 07:37
Reddit上的一篇热帖

原文: https://old.reddit.com/r/ExperiencedDevs/comments/nmodyl/drunk_post_things_ive_learned_as_a_sr_engineer/
中文版: https://www.ruanyifeng.com/blog/2021/06/drunk-post-of-a-programmer.html

(1)职业发展的最好方法是换公司。

以及(9)条 (15)条 (17)条,(21)(22)条, (23)是值得学习的。 以及(24)(25)条

(2)技术栈不重要。技术领域有大约 10-20 条核心原则,重要的是这些原则,技术栈只是落实它们的方法。你如果不熟悉某个技术栈,不需要过度担心。

那么问题来了,他心中的这10-20条核心原则是什么?架构设计中的吗?编码中的吗?产品中的吗?一起的呢?

(3)工作和人际关系是两回事。有一些公司,我交到了好朋友,但是工作得并不开心;另一些公司,我没有与任何同事建立友谊,但是工作得很开心。

@mylamour
mylamour / Enterprise Security Architecture Note.md
Created August 19, 2021 06:13
Generated from Enterprise Security Architecture.pdf Automatically

1. The Meaning of Security

1.1. The Cultural Legacy: Business Prevention

  • Security has a bad reputation for getting in the way of real business
  • This reputation has developed because of the way security professionals have practised
  • We need an accurate definition of what we mean by ‘security’
  • A technical definition of security may not be helpful
  • Security can be defined only relative to the value and risk propositions of the business

1.2. Measuring and Prioritising Business Risk

  • Risk is a combination of asset value, business impact, threat and vulnerability
  • Risk management is a combination of risk assessment and ‘risk mitigation’
@mylamour
mylamour / epub_image.py
Last active August 19, 2021 06:05
Easy to extract all image from epub file. and extract highlight docs as note.
import ebooklib
from ebooklib import epub
book = epub.read_epub('./Enterprise Security Architecture.epub')
for image in book.get_items_of_type(ebooklib.ITEM_IMAGE):
with open('./test/{}'.format(image.file_name.split('/')[-1]),'wb') as im:
im.write(image.content)
@mylamour
mylamour / online.py
Created August 12, 2021 07:16
"Keep me online"
import time
import random
import pyautogui
FLAG = True
OFFLINETIME = "18:00:00"
while True:
t = time.localtime()