Skip to content

Instantly share code, notes, and snippets.

Avatar

Giuseppe Maxia datacharmer

View GitHub Profile
@virtuald
virtuald / sshpass.py
Created Dec 20, 2014
Simple python wrapper to give SSH a password for automation purposes (with output capture)
View sshpass.py
#!/usr/bin/env python3
import os
import sys
_b = sys.version_info[0] < 3 and (lambda x:x) or (lambda x:x.encode('utf-8'))
def ssh_exec_pass(password, args, capture_output=False):
'''
Wrapper around openssh that allows you to send a password to
@m3nd3s
m3nd3s / NERDTree.mkd
Last active Aug 7, 2022
My Vim Cheat Sheet
View NERDTree.mkd

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@bemasher
bemasher / stack.go
Last active Aug 19, 2020
A simple LIFO stack backed by a linked list implemented with golang.
View stack.go
package main
import (
"fmt"
)
type Stack struct {
top *Element
size int
}