Map | Action |
---|---|
<F1> | Causes Netrw to issue help |
<cr> | Netrw will enter the directory or read the file |
<del> | Netrw will attempt to remove the file/directory |
- | Makes Netrw go up one directory |
a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
c | Make browsing directory the current directory |
C | Setting the editing window |
d | Make a directory |
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
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
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
require 'octokit' | |
client = Octokit::Client.new(:login => 'username', :password => 'password') | |
user = client.user | |
user.login | |
files = [] | |
pr_commits_r = client.pull_request_commits("darwinia-network/substrate", 3, :state => "closed") | |
pr_commits_r.each do |commit| | |
commit_r = client.commit("paritytech/substrate", commit.sha) |
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
require 'bundler/setup' | |
require 'eventmachine' | |
require 'open-uri' | |
EM.run do | |
puts "main: #{Thread.current}" | |
operation = proc { | |
puts "defer operation: #{Thread.current}" | |
sleep(20) |
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
const { ApiPromise } = require('@polkadot/api'); | |
const { u8aToHex } = require('@polkadot/util'); | |
async function main () { | |
const api = await ApiPromise.create(); | |
const blockNumber = 100; | |
const result = await getEventsByBlock(api, blockNumber); | |
console.log(JSON.stringify(result)); | |
api.disconnect(); | |
} |
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 std::collections::HashMap; | |
#[derive(Clone)] | |
struct Account { | |
token_balance: u64, | |
payouts: f64, | |
} | |
struct P3d { | |
accounts: HashMap<u32, Account>, |
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
call plug#begin() | |
" A Lightweight File Browser based on netrw | |
Plug 'tpope/vim-vinegar' | |
" wisely add end in ruby, endfunction/endif/more in vim script, etc | |
Plug 'tpope/vim-endwise' | |
" quoting/parenthesizing made simple | |
Plug 'tpope/vim-surround' |
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
hardstatus off | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W} %c %{g}]' | |
startup_message off | |
termcapinfo xterm* ti@:te@ | |
altscreen on |
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
# litecoin.conf configuration file. Lines beginning with # are comments. | |
# Network-related settings: | |
# Run on the test network instead of the real litecoin network. | |
#testnet=0 | |
# Connect via a socks4 proxy | |
#proxy=127.0.0.1:9050 |