Skip to content

Instantly share code, notes, and snippets.

View scott3j's full-sized avatar

Scott Jensen scott3j

View GitHub Profile
@alexisrobert
alexisrobert / webserver.go
Created May 20, 2011 10:13
Tiny web server in Go for sharing a folder
/* Tiny web server in Golang for sharing a folder
Copyright (c) 2010-2014 Alexis ROBERT <[email protected]>
Contains some code from Golang's http.ServeFile method, and
uses lighttpd's directory listing HTML template. */
package main
import "net/http"
import "net/url"
@JalfResi
JalfResi / revprox.go
Last active August 9, 2025 19:56
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@dbalatero
dbalatero / practice
Last active February 16, 2025 17:00
Records how long you practice something (guitar, language, etc) each day, and displays it.
#!/usr/bin/env ruby
class Practice
def initialize
@data = {}
try_to_load_data
end
def record_today(minutes)
@data[key_for(Time.now)] = minutes
@paulmach
paulmach / serve.go
Last active January 29, 2026 16:10
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@terrywbrady
terrywbrady / GoogleSpreadsheet.html
Last active October 10, 2025 20:59
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}
@jpillora
jpillora / smtp-gmail-send.go
Last active July 19, 2025 18:39
Send email using Go (Golang) via GMail with net/smtp
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}
.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go
@yowu
yowu / HttpProxy.go
Last active October 29, 2025 09:20
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@luisangelma
luisangelma / main.js
Last active September 25, 2022 06:48
CLI RPG Game
// Requirement
// Readline Sync Node package
var readlineSync = require('readline-sync');
var name = readlineSync.question('Hey stranger, what is your name?: ');
var enemies = ['White Walker', 'White Orc', 'Wild Dragon'];
var wildAdventure = function() {
var self = this;
@seblegall
seblegall / reverseproxy.go
Last active October 16, 2025 06:16
A reverse proxy in Golang using Gin
package main
import (
"fmt"
"net/http"
"net/http/httputil"
"net/url"
"github.com/gin-gonic/gin"
)