Skip to content

Instantly share code, notes, and snippets.

View ravenxrz's full-sized avatar
🎯
Focusing

Raven ravenxrz

🎯
Focusing
View GitHub Profile
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@ravenxrz
ravenxrz / spy_ui.log
Created May 31, 2022 07:14
nvim-gdb log
2022-05-31 15:12:03,973 [INFO]: Starting SpyUI 170x45
2022-05-31 15:12:03,979 [INFO]:
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |
| |
| |
| |
|
@ravenxrz
ravenxrz / 彩云小译.js
Created August 1, 2020 07:22
彩云小译油猴脚本
// ==UserScript==
// @name 彩云小译
// @namespace https://github.com/yandd
// @version 1.1.0
// @icon https://www.caiyunapp.com/favicon.ico
// @description 彩云小译 提供中英对照翻译
// @author yandd <https://github.com/yandd>
// @supportURL https://github.com/yandd
// @match *://*/*
// @run-at document-end
@ravenxrz
ravenxrz / main.c
Created July 30, 2020 13:32
获取nvmesmart信息
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include "linux/nvme.h"
@ravenxrz
ravenxrz / analysis.m
Last active March 5, 2020 04:48
验证不同拥塞算法下的拥塞窗口变化
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 网络实验lab3-- 拥塞控制算法
% 数据分析脚本
% 适用文件命名规则: {algorithm}_{type}{typevalue}.txt
% 如: cublic_loss2.5%.txt
% author: raven
% date: 2019-12-13
%----------------------------------------------------------
% 数据样本每列参数
% 1 timestamp //时间戳
@ravenxrz
ravenxrz / actionlist.vim
Created August 10, 2019 07:36 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@ravenxrz
ravenxrz / .ideavimrc
Last active July 22, 2020 03:40
.ideavimrc
" 显示当前模式
set showmode
" 共享系统粘贴板
set clipborad=unamed
" 打开行号
set number
" 打开相对行号
" set relativenumber
" 设置命令历史记录条数
set history=2000
@ravenxrz
ravenxrz / .zshrc
Created July 28, 2019 10:46
zsh配置
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/raven/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@ravenxrz
ravenxrz / .vimrc
Created July 11, 2019 08:13
Vim配置文件
" 打开行号
set number
" 设置命令历史记录条数
set history=200
" 关闭兼容vi
set nocompatible
" 开启语法高亮功能
syntax enable
" 允许用指定语法高亮配色方案替换默认方案
syntax on
@ravenxrz
ravenxrz / music_download.py
Created June 12, 2019 13:35
音乐下载脚本
"""
音乐爬取器
"""
import os
from time import sleep