Skip to content

Instantly share code, notes, and snippets.

bairuw7rip5rabgdvot3trp6dudhwewxhtst5nooioecnxnunfea
@sanatgersappa
sanatgersappa / sudoku.clj
Created April 24, 2020 12:04 — forked from orb/sudoku.clj
updated for the latest core.logic, with some minor tweaks for (I hope) clarity
(ns sudoku
(:refer-clojure :exclude [==])
(:use [clojure.core.logic])
(:require [clojure.core.logic.fd :as fd]))
(defn init-board [vars puzzle]
(matche [vars puzzle]
([[] []]
succeed)
@sanatgersappa
sanatgersappa / alt.go
Last active March 28, 2020 07:24
Alternative handler for multiple file uploads in Go.
package main
import (
"html/template"
"io"
"net/http"
"os"
)
//Compile templates on start
@sanatgersappa
sanatgersappa / gist:4030649
Created November 7, 2012 10:10
Querying Sharepoint on Office365 with Go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"log"
"regexp"
"strings"
)
@sanatgersappa
sanatgersappa / app.go
Created March 10, 2013 06:02
Web app written in Go to demonstrate handling multiple file uploads.
package main
import (
"html/template"
"io"
"net/http"
"os"
)
//Compile templates on start
(defn distinct-by [f n] (map first (vals (group-by f n))))
package main
//implements the SFTP Service. Needs to be installed and managed using NSSM.
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
"os"

Keybase proof

I hereby claim:

  • I am sanatgersappa on github.
  • I am sanatgersappa (https://keybase.io/sanatgersappa) on keybase.
  • I have a public key ASBGNtlX3A54K29ZljNFsNlEPmqnvU1mac-IVyrPFrI8xQo

To claim this, I am signing this object:

package main
import (
"html/template"
"net/http"
)
//Compile templates on start
var templates = template.Must(template.ParseFiles("header.html", "footer.html", "main.html", "about.html"))
{{define "about"}}
{{template "header" .}}
<div class="content">
<h2>About</h2>
<div>This is the About page</div>
</div>
{{template "footer" .}}
{{end}}