Skip to content

Instantly share code, notes, and snippets.

View aanari's full-sized avatar

Ali Anari aanari

View GitHub Profile
@aanari
aanari / use lemonade for remote clipboard sharing
Created July 19, 2022 05:34 — forked from bketelsen/use lemonade for remote clipboard sharing
how to use lemonade to share a clipboard between remote computers
on local and remote machine:
go get github.com/pocke/lemonade (if you have Go installed, if not download lemonade binary from github)
make sure $GOPATH/bin is in your path on both machines
-- or move $GOPATH/bin/lemonade to a place already in your path like /usr/local/bin
on your local machine add a script like this:
cat ~/bin/remote
@aanari
aanari / tmux_install.sh
Created November 18, 2020 14:29 — forked from japrescott/tmux_install.sh
Install tmux 2.7 on Ubuntu 16.04 from source
sudo apt-get update
sudo apt-get install -y libevent-dev libncurses-dev make
cd /tmp
curl -LO https://github.com/tmux/tmux/releases/download/2.7/tmux-2.7.tar.gz
tar xvzf tmux-2.7.tar.gz
cd tmux-2.7/
./configure && make
sudo make install
cd ..
rm -rf ./tmux-2.7*
@aanari
aanari / clip
Created May 27, 2020 17:34 — forked from elwinar/clip
Shortcut to pipe from and to clipboard using xclip
#!/bin/bash
# Linux version
# Use this script to pipe in/out of the clipboard
#
# Usage: someapp | clip # Pipe someapp's output into clipboard
# clip | someapp # Pipe clipboard's content into someapp
#
if command -v xclip 1>/dev/null; then
if [[ -p /dev/stdin ]] ; then
@aanari
aanari / gist:0fa403e224bdb2fab1c2994ff6c26c1d
Created December 30, 2017 22:04 — forked from jedi4ever/gist:903751
Tuning stuff for Ubuntu hosts
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
@aanari
aanari / sftpserver_main.py
Created December 14, 2017 00:13 — forked from Girgitt/sftpserver_main.py
multithreaded sftp server in python based on https://github.com/rspivak/sftpserver
import time
import socket
import optparse
import sys
import textwrap
import paramiko
from sftpserver.stub_sftp import StubServer, StubSFTPServer