Skip to content

Instantly share code, notes, and snippets.

🖥
Working at 🏠

Hu Junqing LearnShare

🖥
Working at 🏠
Block or report user

Report or block LearnShare

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@LearnShare
LearnShare / test.js
Created Nov 27, 2019
generate aes key
View test.js
// https://stackoverflow.com/questions/6226189/how-to-convert-a-string-to-bytearray
function str2bytes(str) {
const bytes = [];
for (let i = 0; i < str.length; i += 1) {
const code = str.charCodeAt(i);
bytes.push(code);
}
@LearnShare
LearnShare / profile
Created Sep 17, 2019
`cat /etc/profile` on macOS
View profile
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
@LearnShare
LearnShare / profile
Created Sep 17, 2019
`cat /etc/profile` on macOS
View profile
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
@LearnShare
LearnShare / settings.json
Last active Aug 8, 2019
VSCode settings
View settings.json
{
"material-icon-theme.showWelcomeMessage": false,
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.lineHeight": 28,
"workbench.colorTheme": "Material Theme",
"editor.fontFamily": "Monaco",
"workbench.iconTheme": "eq-material-theme-icons",
"workbench.startupEditor": "newUntitledFile",
@LearnShare
LearnShare / readme.md
Created May 22, 2017
虾米 - 批量删除收藏的音乐
View readme.md

使用方法:

  1. 登录并打开 我的音乐 - 音乐库 - 收藏的音乐 页面;
  2. 打开浏览器开发工具,切换到 Console 页面;
  3. 粘贴下面的代码,并点击回车键;
  4. 操作完成后,刷新页面;
  5. 重复 3、4 两步。

免责声明:

@LearnShare
LearnShare / nginx.conf
Created Jul 19, 2016
Nginx config for Angular.js $locationProvider.html5Mode(true)
View nginx.conf
server {
listen 80;
server_name localhost;
root /Users/[user_name]/works/[project_name]/dist/;
location = / {
index index.html;
break;
}
You can’t perform that action at this time.