Hello Navi

note and sharing

使用 Docker 运行 MySQL

1. 快速启动 MySQL 容器

1
sudo docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
  • 使用 -p 3306:3306 将主机的 3306 端口映射到容器的 3306 端口。
  • 使用 --name mysql 为容器命名为 mysql
  • 使用 -e MYSQL_ROOT_PASSWORD=123456 设置 MySQL 的 root 用户密码为 123456
  • 使用 -d mysql:latest 后台运行最新版本的 MySQL。

2. 使用挂载卷启动

持久化数据和配置

1
2
3
4
5
6
7
sudo docker run --name mysql \
-p 3306:3306 \
-v /usr/local/docker/mysql/conf:/etc/mysql \
-v /usr/local/docker/mysql/logs:/var/log/mysql \
-v /usr/local/docker/mysql/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-d mysql:latest

3. 进入 MySQL 容器

1
2
sudo docker exec -it mysql bash
mysql -uroot -p123456
  • sudo docker exec -it mysql bash 命令进入名为 mysql 的容器的 bash 环境。
  • mysql -uroot -p123456 命令使用 root 用户登录 MySQL,密码为 123456

4. 从本地复制文件到容器

如果需要将本地文件复制到容器中,可以使用以下命令:

1
2
docker cp 本地文件路径 ID全称:容器路径
docker cp /path/to/file.sql mysql:/root

5. 在 MySQL 中创建数据库和导入数据

1
2
3
4
mysql> create database name;
mysql> use name;
mysql> set names utf8;
mysql> source /name.sql;

不同色调的红色

  • 红色 (Red)
  • 粉红 (Pink)
  • 红褐色 (Sorrel)
  • 绯红 (Scarlet)
  • 紫红 (Purplish Red)
  • 酒红 (Wine Red)
  • 土红 (Reddle)
  • 深紫红 (Prune)
  • 淡红 (Pale Red)
  • 朱红色 (Vermilion)
  • 玫瑰红 (Rosy)
  • 橘红 (Jacinth)
  • 血红 (Blood-red)
  • 草莓红 (Strawberry Red)
  • 脸红的 (Blushing)
  • 腥红 (Crimson)
  • 珊瑚红 (Coral)

more

Encycolorpedia一个提供颜色代码和颜色匹配称呼的网站

  • 颜色代码查询:通过输入颜色代码(如 HEX、RGB)来获取详细的颜色信息。
  • 命名颜色:列出了具有特定名称的颜色及其代码。

Match The Colors - Retryables匹配给定的颜色的在线游戏

  • 游戏玩法:使用三个滑块来调整 RGB 颜色值,尽量匹配提供的目标颜色。

pwn

useful

  • pwn
    • https://ch4r1l3.github.io/page/4/

IDA

function name

sub_4003E0

strings

  • SHIFT F12

pseudocode

博客迁移

到了不得不选择重建的时候

原博客使用的是hexo框架,主题是shoka,但是shoka主题的配置文件已经很久没有更新。我又不会自己修改配置勉强配好评论和搜索功能,过几天又不好使了,开始无限加载。

shoka主题本身的动效和设计特别好看,但被我折腾几顿后,用起来特别难受。一是为了省事,我把图片全放在图床上,每次上传图片都需要重新上传,非但不省事还更加麻烦,得时不时到处搜罗擅自使用图片,再传到加载速度如龟爬的免费图床。每次刷新加载图片造成卡顿,导致每次想上来看看笔记时不得不卡上几秒,等待图片加载。再对比主题制作者的博客完全没有我这种情况,加载图片和css都很快,而且作者博客的评论和搜索功能都很好用。

但以上原因都是间接的,等待加载在多数时候并不是要紧事。直接原因源于这周的突发奇想,把obsidian记录的latex笔记上传到博客。上传的过程不是我想象的一帆风顺,先是调整好格式后generate,跳出几十行看不懂的报错,接着是调整语法和格式本地修改,语法问题虽然解决了一大半,但重复渲染页面、重复加载的痛苦也被体会到。对我这个虽然敲不出几个字,懒得学着折腾但要求很多的技术菜鸟来说或许已经到了得要更换一个简单易用的博客框架或者主题的时候了。

新博客应该是什么样的

对新博客的要求如下 - 项目在持续维护 - 能直接部署在GitHub page 上 - 支持评论 - 支持搜索 - 主题极简、主页无图片 - 主题简单易用

答案到这似乎很明显了,选next就是正确答案,恰到好处的动效,极简的主页,而且最重要的,简单。但缺点……好吧,我关心的老版本的缺点在新的next主题上已经不存在了。看过next主题的文档,发现next主题的配置文件已经相当完善,甚至会教如何自定义主题。一番学习后,顺利配置好了想要的效果。还看大佬教程注入了石蒜小组件,看着主页心情都变好了。后续打算把obsidian的笔记迁移过来,把之前的笔记重新整理一下,再逐渐对新博客微调配色之类的外观件。希望我在新博客能一直使用下去,记录生活学习。

最后感谢大佬们维护next-theme,和相关的组件。

参考资料

  1. next-theme-doc

  2. Yu's blog

  3. Hexo-添加-Sakana-小部件

  4. hexo-doc

OSINT

  • https://www.google.com/advanced_search
  • https://yandex.com/
  • https://tineye.com/

fakenamegenerator

  • https://www.fakenamegenerator.com/

exiftool

  • https://onlineexifviewer.com/

satellite image

https://www.google.com/maps/@37.4219999,-122.0840575,3a,75y,35.56h,90t/data=!3m6!1e1!3m4!1sAFQjCNGR9Z5wZj4Y6h8q8zQ5hZ1Zl7q6Q!2e0!7i13312!8i6656

geoguessr tips

  • https://somerandomstuff1.wordpress.com/2019/02/08/geoguessr-the-top-tips-tricks-and-techniques/

email

  • https://phonebook.cz
  • https://www.voilanorbert.com/
  • clearbit connect
  • email checker
    • https://email-checker.net/check

domain

  • https://www.whois.com/whois/

data breach

  • https://dehashed.com/
  • https://weleakinfo.io/
  • https://namechk.com
  • https://whatsmyname.app/?trk=article-ssr-frontend-pulse_little-text-block
  • https://www.whitepages.com/
  • https://www.truepeoplesearch.com/
  • https://webmii.com/
  • https://thatsthem.com/
  • https://www.spokeo.com/
  • https://voterrecords.com/

hash decrypt

  • https://hashes.com/en/decrypt/hash

phone

  • https://www.truecaller.com/
  • https://calleridtest.com/

twitter search advanced

  • https://twitter.com/search-advanced
  • https://www.tweetbinder.com/blog/twitter-geocode/
  • https://thoughtfaucet.com/search-twitter-by-location/examples/
    • From the url
    • Entering the search string below let’s you use twitter location search to see their tweets:
    • geocode:38.890550,-77.009017,.02km
    • The above string will give you Tweets in a 0.02km radius around the Capitol. You can expand or shrink the geofence however you like however you like. But if you want to search Twitter for a specific date range, for example, 1/6/2021, you’ll need to add that as well:
    • geocode:38.890550,-77.009017,.02km
    • since:2021-01-05 until:2021-01-07

twitter tool

  • xPro pay to use
  • api change

maybe useful

OSINT Framework

  • https://osintframework.com/ ### integration tool
  • https://www.aware-online.com/en/ ### long-tail keyword
  • https://keywordtool.io/

网络分层模型

OSI模型(Open Systems Interconnection model),该模型分为7层:

  1. 物理层(Physical Layer)
  2. 数据链路层(Data Link Layer)
  3. 网络层(Network Layer)
  4. 传输层(Transport Layer)
  5. 会话层(Session Layer)
  6. 表示层(Presentation Layer)
  7. 应用层(Application Layer)
  • tap: 属于数据链路层(第2层)。tap设备用于在以太网帧级别操作。

  • tun, vpn: 属于网络层(第3层)。tun设备用于IP包级别操作,VPN通常工作在第3层(网络层)。

  • icmp: 属于网络层(第3层)。ICMP(Internet Control Message Protocol)用于网络设备间的控制信息传递,如ping命令。

in short

1
2
3
4
5
6
7
8
9
- **tap**: 2层(数据链路层)
- **tun, vpn**: 3层(网络层)
- **icmp**: 3层(网络层)
- **TCP/UDP**: 4层(传输层)
- **socks**: 7层(应用层)建立连接和传输数据时也涉及传输层(第4层)
- **system proxy (clash default)**: 7层(应用层)no ICMP
- **proxychains**: 7层(应用层)no ICMP
- **HTTP/HTTPS、FTP、SMTP**: 7层(应用层)
- **SSH**: 7层(应用层)使用传输层协议(通常是 TCP)22 port

tips:

  • SOCKS4:支持基本的 TCP 流量转发,不支持 UDP。
  • SOCKS5:扩展了 SOCKS4 的功能,增加了对 UDP 流量的支持,并且提供了更强的认证和安全特性。
  • proxychains 是一个工具,它会拦截应用程序的网络连接,并通过代理服务器转发这些连接。它通常用于让应用程序通过 SOCKS 或 HTTP 代理连接到网络。由于 proxychains 操作的是应用程序层的流量,并且修改传输层的连接请求,它应归类为应用层(第7层),尽管操作涉及传输层(第4层)的连接。

Configuring Proxy Settings

In the development world, setting up a proxy is a common task, especially when working behind a corporate firewall or when you want to ensure secure and private browsing. Proxies act as intermediaries between your computer and the internet, helping in filtering requests, improving security, and managing network traffic more efficiently.

NPM

Setting up Proxy in NPM

To configure npm to use a proxy, you can use the npm config set command as follows:

1
2
npm config set proxy "http://localhost:7890"
npm config set https-proxy "http://localhost:7890"

Here, http://localhost:7890 is the address of your proxy server. Change it according to your proxy server's IP address and port number.

Removing Proxy Configuration

If you need to remove the proxy configuration, for instance, when you're not behind a proxy anymore, you can use the npm config delete command:

1
2
npm config delete proxy
npm config delete https-proxy

Linux Shell Proxy Configuration

Setting up Proxy

You can set proxy environment variables in the shell as follows:

1
2
export http_proxy="http://localhost:7890"
export https_proxy="https://localhost:7890"

Replace localhost:7890 with your proxy server's IP address and port. Note the difference in the protocol (http vs. https) for http_proxy and https_proxy.

Removing Proxy Configuration

To revert the changes or to disable the use of a proxy, you can unset these environment variables:

1
2
unset http_proxy
unset https_proxy

Pip Proxy Configuration

Using Proxy with Pip

1
pip --proxy http://localhost:7890 install somepackage

Replace http://localhost:7890 with your proxy's URL. Append the name of the package you wish to install instead of somepackage.

git

1
2
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
1
2
git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global https.https://github.com.proxy https://127.0.0.1:7890
1
2
3
git config --global --unset http.proxy
git config --global --unset https.proxy

unfinished