这里我们拿 Android 上一款开源的播客播放器 AntennaPod 举例。
This file contains 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
#!/bin/bash | |
sudo apt-get install git | |
git clone https://github.com/njukidreborn/vimbackup.git ~/.vim | |
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle | |
ln -s ~/.vim/vimrc ~/.vimrc | |
ln -s ~/.vim/gvimrc ~/.gvimrc |
This file contains 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 urllib2 | |
import urllib | |
import json | |
import ConfigParser | |
COMMENTS_SHOW = 'https://api.weibo.com/2/comments/show.json' | |
USER_TIMELINE = 'https://api.weibo.com/2/statuses/user_timeline.json' | |
HDR = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', |
This file contains 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
from bs4 import BeautifulSoup | |
import urllib2 | |
url = 'https://path.com/developers/docs' | |
data = urllib2.urlopen(url).read() | |
soup = BeautifulSoup(data) | |
for node in soup.findAll(attrs={'class': 'curl'}): | |
print node.contents[0] |
This file contains 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
var test = ` | |
{"results":[{"extensions":[{"publisher":{"publisherId":"a5c25faf-bf60-4941-81b9-9a852b96c5fb","publisherName":"ms-vscode","displayName":"ms-vscode","flags":"none"},"extensionId":"c3c225bf-758d-4db6-9341-00952baff6dd","extensionName":"node-debug","displayName":"Node Debug","flags":"validated, public","lastUpdated":"2016-04-26T16:14:04.087Z","publishedDate":"2015-11-22T07:57:09.457Z","shortDescription":"%extension.description%","versions":[{"version":"0.0.2","flags":"validated","lastUpdated":"2016-04-26T16:14:04.557Z","assetUri":""},{"version":"0.0.1","flags":"validated","lastUpdated":"2015-11-22T07:57:09.79Z","assetUri":""}],"categories":["Debuggers"],"tags":["vscode"],"statistics":[{"statisticName":"install","value":1574},{"statisticName":"trendingdaily","value":7.013358778625954},{"statisticName":"trendingmonthly","value":90.17175572519083},{"statisticName":"trendingweekly","value":38.57347328244275}]},{"publisher":{"publisherId":"a5c25faf-bf60-4941-81b9-9a852b96c5fb","publisherName":"rebornix", |
This file contains 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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>For Topre REALFORCE 87u Users</name> | |
<devicevendordef> | |
<vendorname>TopreCorporation</vendorname> | |
<vendorid>0x0853</vendorid> | |
</devicevendordef> | |
<item> | |
<name>Fix FN + F1..F12 and functional keys</name> |
This file contains 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
#!/bin/sh | |
pass=true | |
RED='\033[1;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
echo "Running Linters:" | |
Open a TypeScript project, or whatever project whose language supports it. Move cursor to a symbol which is defined elsewhere, press F12, move hjkl
to see if the cursor is positioned correctly.
- Open the same file in two Group Editors by clicking
Split Editor
button. Switching between these two windows by pressing<C-w> hl
or using Mouse. After switching window, presshjkl
to see the cursor position is updated correctly. - Open different files in two Group Editors. Other steps are the same as above.
Make sure visual selection still works by pressing "go to matching brace" % command.
This file contains 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 * as vscode from 'vscode'; | |
class PSNB implements vscode.NotebookProvider { | |
constructor() {} | |
async resolveNotebook(editor: vscode.NotebookEditor): Promise<void> { | |
editor.document.languages = ['powershell']; | |
const uri = editor.document.uri; | |
const data = (await vscode.workspace.fs.readFile(uri)).toString(); | |
const lines = data.split(/\r|\n|\r\n/g); |
This file contains 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 SwiftUI | |
struct Task: Codable, Identifiable, Hashable { | |
var id: Int | |
var name: String | |
} | |
struct ContentView: View { |