Skip to content

Instantly share code, notes, and snippets.

View Elinvention's full-sized avatar

Elia Argentieri Elinvention

View GitHub Profile
@leefsmp
leefsmp / models.java
Last active February 11, 2024 19:52
Basic RESTful API from a Java servlet
package com.autodesk.adn.viewanddata;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashMap;
import java.util.UUID;
import javax.servlet.ServletException;
@ben-joostens
ben-joostens / gist:a8293bf921a627ae7829
Created July 14, 2015 17:25
Start TMUX when logging in (fish shell)
#
# From: http://unix.stackexchange.com/questions/121401/how-can-i-start-tmux-automatically-in-fish-shell-while-connecting-to-remote-serv
#
if status --is-login
set PPID (echo (ps --pid %self -o ppid --no-headers) | xargs)
if ps --pid $PPID | grep ssh
tmux has-session -t remote; and tmux attach-session -t remote; or tmux new-session -s remote; and kill %self
echo "tmux failed to start; using plain fish shell"
end
end