Skip to content

Instantly share code, notes, and snippets.

@banyudu
banyudu / extract-source-from-source-map.blog.md
Last active October 12, 2023 08:13
如何从JS的source map中还原源代码

如何从JS的source map中还原源代码

在现代的前端开发过程中,source map是非常常见的,无论是babel转码、还是webpack打包,或者typescript编译,都会生成一份.map文件,就是我们说的source map文件。

首先,在Chrome等浏览器的devtools中可以看到源代码,说明根据.map肯定是能还原源代码的。不过浏览器只提供了单个文件的方式,对于想在工程级别还原整个代码的需求,还是不太方便。

下面我们通过分析一些现有的工具,一步步解析这个过程。

@zorrodg
zorrodg / LICENSE
Last active November 30, 2023 19:37
CLI Integration Test Helper
MIT License
Copyright © 2019 Andrés Zorro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@rambolee
rambolee / gvm-修改国内镜像.md
Created May 9, 2017 06:31
Golang GVM 修改国内镜像

使用 GVM 安装不同版本的 Go。碰到问题是国内无法访问 GVM 配置的源地址。报如下错误:

[root@mq:/home/wwwroot/]
$ gvm install go1.8
Downloading Go source...
Installing go1.8...
 * Compiling...
ERROR: Couldn't download Go source. Check the logs /root/.gvm/logs/go-download.log
$ cat /root/.gvm/logs/go-download.log
@JesseRWeigel
JesseRWeigel / commands.txt
Created April 28, 2017 19:22
ImageMagick Compression Commands
// Must install ImageMagick first
http://www.imagemagick.org/script/index.php
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg
// This does the same as above but to an entire folder (will overwrite original files):
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files)
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 5, 2024 18:31
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 17:53
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: