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
(?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

前言

上篇博客我说,最近可能是突破瓶颈期了,然后应该会陷入新的瓶颈。然后突然发现其实不然.本篇博客将浅显得讨论一下反入侵体系的建设。

原则

所谓的道术器,即治理的方向,方法,依赖工具。打个比方: 骑x向x走。 骑就是治理方法,治理方向就是向哪走,骑的那个东西就是依赖的工具。反入侵的治理过程的道术器一言以蔽之就是:通过安全产品分别从数据安全和产品安全角度进行识别、防御、检测、响应、恢复。其中识别、防御属于阻止Preventive,响应、恢复属于校正Corrective,还有一部分就是Detective。一个完整的治理就应该是从预防到检测最后到校正的阶段。同时在每一个阶段中继续采用这种方向方法依赖的模型去进行思考。 image

@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;
@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()
#!/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 / 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