Skip to content

Instantly share code, notes, and snippets.

View vsalvino's full-sized avatar

Vince Salvino vsalvino

View GitHub Profile
@FlipperPA
FlipperPA / virtualenvwrapper-venv-aliases.sh
Last active June 14, 2023 16:56
Shortcuts for Python 3's venv for virtualenvwrapper users.
export VENV_HOME=~/.venvs
export VENV_PYTHON=/usr/bin/python3.6
fn_workon() {
if [ -f "${VENV_HOME}/${1}/bin/activate" ]; then
export VENV_CURRENT="${VENV_HOME}/${1}"
# Run commands before activation
if [ -f "${VENV_CURRENT}/pre_activate.sh" ]; then
. "${VENV_CURRENT}/pre_activate.sh"
fi
@AlexMocioi
AlexMocioi / ReadSTDIN.go
Created April 6, 2014 16:24
Read big text data from SDIN in Go
package main
import "fmt"
import "bufio"
import "os"
func main() {
f, _ := os.Create("outputgo.txt")
reader := bufio.NewReader(os.Stdin)
for {
line, err := reader.ReadString('\n')