Skip to content

Instantly share code, notes, and snippets.

@jasperes
jasperes / UserAuthPubKey.java
Created January 3, 2020 17:41
SFTP Upload Sample
import com.jcraft.jsch.Channel;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.Session;
import java.io.File;
import java.net.URL;
public class UserAuthPubKey {
public static void main(String[] arg) {
@jasperes
jasperes / git-checkout-all-remote-branchs.sh
Last active August 14, 2017 12:42
Git checkout all remote branchs
#!/bin/bash
for bb in $(
for b in $(git branch --remote); do
echo $b;
done | cut -d '/' -f2)
do
[ "$bb" != "HEAD" ] && [ "$bb" != "->" ] && git checkout $bb;
done