This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Concurrency Pattern using Wait Groups and Buffered Channels | |
package main | |
import ( | |
"time" | |
"fmt" | |
"sync" | |
) | |
// Synopsis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
<script type="text/javascript" src="js/jquery.serialize-object.min.js"></script> | |
<style> | |
* box-sizing {border-box} | |
body {background-color: tan} | |
.module {margin: 2px; padding-bottom: 0.3rem} | |
</style> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<title>htm Demo</title> | |
<script type="module"> | |
import { html, Component, render } from 'https://unpkg.com/htm/preact/standalone.mjs'; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.Pi = 3.1416; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Standalone Http to Https redirector | |
// Credit: https://gist.github.com/d-schmidt/587ceec34ce1334a5e60 | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/bramvdbogaerde/go-scp" | |
"github.com/bramvdbogaerde/go-scp/auth" | |
"golang.org/x/crypto/ssh" | |
"os" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"reflect" | |
) | |
type User struct { | |
Username string `json:"user" db:"username"` |
OlderNewer