Skip to content

Instantly share code, notes, and snippets.

@everbird
everbird / Makefile
Last active March 27, 2021 10:31
Add notes to Anki with paraphrase from ECDICT and sync via cli (This is lightweight without any QT related packages. https://github.com/lervag/apy is a more powerful choice for Anki operations via cli, with more dependencies)
##
# GoldenDict to Anki
#
# @file
# @version 0.1
build:
pex -o addnote.pex --python-shebang='/usr/bin/env python3' --requirement=requirements.txt -e addnote -D .
init-db:
@everbird
everbird / ssh-multi.sh
Last active October 24, 2019 22:39 — forked from corny/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi.sh - a script to ssh multiple servers over multiple tmux panes
# usage: type tmux then from inside tmux type ssh-multi.sh HOST1 HOST2 ... HOSTN
# Muayyad Alsadi, D.Kovalov
# https://gist.github.com/muayyad-alsadi/bd25845776bb6b4185ba/
# https://gist.github.com/dmytro/3984680
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# Tested with Ubuntu 16.04 and tmux 2.1
function error() {
@everbird
everbird / gist:4507754
Created January 11, 2013 03:37
A simple demo to invoke douban v2 api using HttpClient 4.2.2
package http.demo;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
public class SimpleClient {
public final static void main(String[] args) throws Exception {