Skip to content

Instantly share code, notes, and snippets.

@lpimem
lpimem / install_neovim_python.sh
Last active September 11, 2023 07:00
Install neovim for linux/macos and set up for Python according to https://medium.com/@hanspinckaers/setting-up-vim-as-an-ide-for-python-773722142d1d
#!/usr/bin/env bash
# Installation directory
DIR=$HOME/app
NVIM_URL_LINUX="https://github.com/neovim/neovim/releases/download/stable/nvim.appimage"
NVIM_URL_MACOS="https://github.com/neovim/neovim/releases/download/stable/nvim-macos.tar.gz"
mkdir -p ${DIR}
cd ${DIR}
syntax on
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree' " file list
Plug 'majutsushi/tagbar' " show tags in a bar (functions etc) for easy browsing
Plug 'vim-airline/vim-airline' " make statusline awesome
Plug 'vim-airline/vim-airline-themes' " themes for statusline
Plug 'jonathanfilip/vim-lucius' " nice white colortheme
Plug 'davidhalter/jedi-vim' " jedi for python
@lpimem
lpimem / ptxs_reading_mode.user.js
Last active May 25, 2019 06:41
Piao Tian Xiao Shuo - Reading Mode
// ==UserScript==
// @name Piao Tian Xiao Shuo
// @namespace http://www.piaotian.com/
// @version 0.1
// @match https://www.piaotian.com/*
// @match http://www.piaotian.com/*
// @match https://www.ptwxz.com/*
// @match http://www.piaotianw.com/*
// @grant none
// ==/UserScript==
@lpimem
lpimem / hn_seach.js
Last active August 1, 2017 18:59 — forked from kristopolous/hn_seach.js
hn job query search
// ==UserScript==
// @name HN Search
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author kristopolous
// @author lowatt
// @match https://news.ycombinator.com/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Hacker News highlighter
// @namespace http://tampermonkey.net/
// @version 0.2
// @description none
// @author lpimem
// @match https://news.ycombinator.com/*
// @grant none
// ==/UserScript==
@lpimem
lpimem / aria2c.py
Last active December 25, 2023 21:12
Aria2 Python Client
import json
import requests
class Aria2c:
'''
Example :
client = Aria2c('localhost', '6800')
# print server version
@lpimem
lpimem / goaccess_gz_example.sh
Created February 18, 2017 22:37
an example using goaccess to analysis compressed log files in .gz format
gzcat $LOGROOT/access.log.*.gz | goaccess -a
@lpimem
lpimem / install_nginx_passenger_for_ubuntu.sh
Last active February 19, 2017 05:35
setup a Ubuntu server for hosting ruby on rails application using nginx and passenger
#! /bin/bash
# -------------------------------------------
# The purpose of this script is to help you
# setup a production server for RubyOnRails
# applications quickly.
#
# It will
# + install nginx, passenger, git, nodejs
# and RVM
@lpimem
lpimem / install_go_ubuntu.sh
Last active February 18, 2017 22:21
install go / golang on ubuntu
#! /bin/bash
# --------------------------------------------
# Go installization script for ubuntu.
# Tested on 16.04
#
# What it does:
# 1. Install go for the system
# 2. create GOPATH for the current user
#