Skip to content

Instantly share code, notes, and snippets.

View bhaveshgohel's full-sized avatar
👨‍💻
I may be slow to respond.

Bhavesh Gohel bhaveshgohel

👨‍💻
I may be slow to respond.
View GitHub Profile
@bhaveshgohel
bhaveshgohel / ftpserver.py
Created November 27, 2015 07:10 — forked from scturtle/ftpserver.py
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')
@bhaveshgohel
bhaveshgohel / SolarInfo.cs
Created October 30, 2015 10:46 — forked from cstrahan/SolarInfo.cs
A sunrise/sunset calculator.
using System;
using System.Diagnostics;
namespace SunriseCalculator
{
public class SolarInfo
{
public double SolarDeclination { get; private set; }
public TimeSpan EquationOfTime { get; private set; }
public DateTime Sunrise { get; private set; }
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');