This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 使用方法: | |
// 1. Chrome打开weibo.com | |
// 2. 打开Chrome Dev Tool(使用 Ctrl/Cmd + Shift + I) | |
// 3. 在Console中复制粘贴以下代码,修改评论id为你要一键拉黑的评论ID | |
// 4. 回车运行 | |
// 获取评论id方法: | |
// 1. 在评论下点击投诉,在新窗口中可以得到评论id,例如 https://service.account.weibo.com/reportspam?rid=XXXXXXXXXX | |
const cId = 123456 // 修改为真实评论ID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey, one of the biggest challenges that | |
English learners face is not knowing how | |
to study English, not having a proper | |
routine that will take them from the | |
intermediate level to the advanced level, | |
not knowing how to actually study English | |
consistently and enjoy the process. | |
Have you ever experienced this challenge? | |
Are you experiencing | |
this challenge right now? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
00:00:04,543 --> 00:00:08,421 | |
所以任何在过去几个月一直关注的人 | |
So anyone who's been paying attention for the last few months | |
2 | |
00:00:08,462 --> 00:00:10,547 | |
都会看到这样的标题, | |
has been seeing headlines like this, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are an expert subtitle translator in all languages. Translate the English subtitle to Chinese subtitle, and keep the original English sentence as new Chinese and English subtitle. Keep the original srt format, make sure the output is valid srt format. Do not miss any empty lines. | |
The basic structure of an SRT file is as follows: | |
- A sequence number indicating the order of the subtitle, let's use {NUMBER} to present it | |
- The start and end timecodes of the subtitle, let's use {TIMECODES} to present it | |
- The subtitle text itself, which may be displayed in multiple lines separated by blank lines | |
Here's an example of what an SRT file might look like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pdf2image import convert_from_path | |
from PIL import Image | |
def merge_images(images): | |
images = [Image.open(x) for x in images] | |
widths, heights = zip(*(i.size for i in images)) | |
total_width = max(widths) if len(widths) < 3 else max(widths) * 2 | |
max_height = max(heights) * 2 if len(heights) > 1 else max(heights) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo lsof -n -i4TCP:8081 # get the process' PID | |
sudo launchctl list | grep <PID> # find the launchd endpoint | |
sudo launchctl remove com.mcafee.agent.macmn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cahce | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; | |
server { | |
listen 80; | |
server_name music.163.com; | |
resolver 114.114.114.114 223.5.5.5; | |
access_log /var/log/nginx/access_163.log; | |
location /weapi/feedback/weblog { | |
add_header Set-Cookie "os=uwp; path=/"; | |
error_page 405 = $uri; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mysql from 'mysql'; | |
import moment from 'moment'; | |
import config from './config'; | |
import logger from './logger'; | |
export default class DB { | |
constructor() { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with | |
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This | |
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise. | |
var gulp = require('gulp'), | |
spawn = require('child_process').spawn, | |
node; | |
/** | |
* $ gulp server | |
* description: launch the server. If there's a server already running, kill it. |