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 / 程序员的酒后真言及我的想法.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 / System Design.md
Last active December 5, 2023 02:54 — forked from vasanthk/System Design.md
System Design Cheatsheet

系统设计备忘录

挑选正确的架构约等于选择正确的战斗并做好权衡

基本步骤

  1. 明确系统边界
  • 用户案列 (描述哪些业务,事件,组合在一起会产生什么样的效果)
    • 谁使用这个系统?
    • 他们怎么使用这个系统?

0x01 密码学基础

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

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

image

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

@mylamour
mylamour / GoogleHackMasterList.txt
Created February 2, 2018 05:26 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@mylamour
mylamour / ALLINSHELL.sh
Created February 9, 2017 08:50
Advace SHELL example , parser from http://www.tldp.org/
This file has been truncated, but you can view the full file.
#!/bin/bash
echo "\$\$ outside of subshell = $$" # 9602
echo "\$BASH_SUBSHELL outside of subshell = $BASH_SUBSHELL" # 0
echo "\$BASHPID outside of subshell = $BASHPID" # 9602
echo
( echo "\$\$ inside of subshell = $$" # 9602
echo "\$BASH_SUBSHELL inside of subshell = $BASH_SUBSHELL" # 1
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
@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 / 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?

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/
@mylamour
mylamour / PosgreSqlToCustomJSON.py
Last active May 9, 2022 14:56
you should have a permition write to destination.
import psycopg2
import psycopg2.extras
import sys
import json
import uuid
def main():
conn_string = "host='ec2-54-xxx-yyy-zzz.cn-north-1.compute.amazonaws.com.cn' " \
"dbname='musicbrainz' " \
"user='postgres' " \