Skip to content

Instantly share code, notes, and snippets.

@smtalim
smtalim / redditnews1.go
Created May 19, 2014 02:18
Iteration 1 code
package main
import (
"io"
"log"
"net/http"
"os"
)
func main() {
package weather
import (
"encoding/json"
"fmt"
"html/template"
"io/ioutil"
"log"
"net/http"
"net/url"
@smtalim
smtalim / weatherui.go
Last active April 15, 2022 15:40
weatherui.go
package main
import (
"encoding/json"
"fmt"
"html/template"
"io/ioutil"
"log"
"net/http"
"net/url"
Part of my golang web app code is:
type DataPoint struct {
Time float64
Summary string
Icon string
SunriseTime float64
SunsetTime float64
PrecipIntensity float64
PrecipIntensityMax float64
@smtalim
smtalim / rubyconfindia14photos.html
Last active August 29, 2015 13:57
RubyConfIndia 2014 photo links
<p>Links to RubyConfIndia 2014 photos.</p>
<ul>
<li><a href="https://plus.google.com/photos/+SatishTalim/albums/5994591149500219697?authkey=CJPHgOuk3c_pVA">Satish Talim</a></li>
<li><a href="https://plus.google.com/u/0/photos/+PriteshJain/albums/5995351019639225041">Pritesh</a></li>
<li><a href="https://www.flickr.com/photos/santoshwadghule/sets/72157643060208803/">Santosh Wadghule</a></li>
<li><a href="http://www.flickr.com/photos/anildigital/sets/72157642906676895/">Anil Wadghule</a></li>
<li><a href="https://www.flickr.com/photos/121535114@N05/">Aruz Parajuli</a></li>
</ul>
package goview
import (
"encoding/json"
"fmt"
"html/template"
"io/ioutil"
"net/http"
"net/url"
@smtalim
smtalim / dosasite.css
Created March 9, 2014 05:42
CSS file for Dosa Site
body {
background-color: #C2A7F2;
font-family: sans-serif;
}
h1 {
color: #2A1959;
border-bottom: 2px solid #2A1959;
}
h2 {
color: #474B94;
@smtalim
smtalim / index.html
Created March 9, 2014 05:41
Index.html for Dosa Site
<!DOCTYPE html>
<html>
<head>
<title>Dosa Diner</title>
<meta charset="utf-8">
<link rel="stylesheet" href="stylesheets/dosasite.css">
</head>
<body>
@smtalim
smtalim / dosasite.go
Created March 9, 2014 05:39
Static site Go program
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
fs := http.FileServer(http.Dir("public"))
@smtalim
smtalim / gomongohq.go
Created February 28, 2014 04:25
A Go web app that accesses a MongoDB database on MongoHQ
package main
import (
"fmt"
"html/template"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"net/http"
"os"
)