Skip to content

Instantly share code, notes, and snippets.

Jorge Matos jorgepsmatos

Block or report user

Report or block jorgepsmatos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Delete.cs
public void Delete(string fileToDelete, string host, string username, string password)
{
try
{
using (var sftpClient = new SftpClient(host, username, password))
{
sftpClient.Connect();
sftpClient.DeleteFile(fileToDelete);
View Download.cs
public void Download(string fileToDownload, string host, string username, string password)
{
try
{
using (var sftpClient = new SftpClient(host, username, password))
using (var fs = new FileStream(Path.GetFileName(fileToDownload), FileMode.OpenOrCreate))
{
sftpClient.Connect();
sftpClient.DownloadFile(
View Upload.cs
public void Upload(string fileToUpload, string host, string username, string password)
{
try
{
using (var sftpClient = new SftpClient(host, username, password))
using (var fs = new FileStream(fileToUpload, FileMode.Open))
{
sftpClient.Connect();
sftpClient.UploadFile(
View ListDirectory.cs
public void ListDirectory(string remoteDirectory, string host, string username, string password)
{
try
{
using (var sftpClient = new SftpClient(host, username, password))
{
sftpClient.Connect();
var files = sftpClient.ListDirectory(remoteDirectory);
@jorgepsmatos
jorgepsmatos / SMWinservice.py
Created Nov 27, 2018
Python Http Server as Windows Service
View SMWinservice.py
'''
SMWinservice
by Davide Mastromatteo
from https://medium.com/the-python-corner/how-to-create-a-windows-service-in-python-88ca534ce76b
Base class to create winservice in Python
-----------------------------------------
Instructions:
@jorgepsmatos
jorgepsmatos / cloudSettings
Last active Oct 7, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-10-07T14:41:29.473Z","extensionVersion":"v3.4.3"}
You can’t perform that action at this time.