Skip to content

Instantly share code, notes, and snippets.

@deepgully
deepgully / hello.go
Last active December 9, 2021 11:43
golang in koding.com
package main
import (
"fmt"
"log"
"net/http"
)
func helloworld(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello Go World!")
# -*- coding: utf-8 -*-
class MagicDict(dict):
def __init__(self, **kwargs):
dict.__init__(self, kwargs)
self.__dict__ = self
def __getattr__(self, name):
self[name] = MagicDict()
return self[name]
import inspect
import logging
import re
# from https://github.com/baniuyao/Python-CLog/blob/master/CLog.py
class LogRecordWithStack(logging.LogRecord):
def __init__(self, *args, **kargs):
super(LogRecordWithStack, self).__init__(*args, **kargs)
self.chain = self.get_meta_data()
@deepgully
deepgully / BasicReq.cs
Created March 15, 2019 10:45 — forked from ruel/BasicReq.cs
A basic HTTP request class in C# that makes things a little bit easier.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Drawing;
namespace BasicReq
{