Skip to content

Instantly share code, notes, and snippets.

View adyatlov's full-sized avatar

Andrey Dyatlov adyatlov

View GitHub Profile
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
"unicode"
)
package main
// NOTE, THAT THIS PROGRAM HAS A BUG
import (
"bufio"
"fmt"
"io"
"log"
"os"
"unicode"
package main
import (
"io"
"log"
"net/http"
)
func main() {
rootHandler := func(w http.ResponseWriter, req *http.Request) {
@adyatlov
adyatlov / files.yaml
Created October 10, 2018 09:13
DC/OS Diagnostics Bundle File Types
- name: active-buildinfo-full
contenttype: JSON
paths:
- opt/mesosphere/active.buildinfo.full.json
description: ""
dirtypes:
- master
- public agent
- agent
- name: cluster-id
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
@adyatlov
adyatlov / s3-upload-aws4.sh
Created July 9, 2016 13:35 — forked from vszakats/s3-upload-aws4.sh
AWS S3 Upload using signature v4
#!/bin/sh
# To the extent possible under law, Viktor Szakats (vszakats.net)
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# Upload a file to Amazon AWS S3 using Signature Version 4
#
# docs:
<!DOCTYPE html>
<html>
<head>
<title>Obey your master</title>
<style type="text/css">
button:not(:last-child) {
margin-right: 10px;
display: inline-block;
}
</style>
@adyatlov
adyatlov / download.go
Last active August 29, 2015 14:22
DownloadZinaidaSerebriakovaPicturesFromQip.go
package main
import (
"bufio"
"golang.org/x/net/html"
"io"
"log"
"net/http"
"os"
"regexp"
for (Job* job: jobs) {
for (ComputeNode* node: nodes) {
if (node->scheduleJob(job)) {
break;
}
}
}
"use strict";
describe("Test Boundary", function() {
var bol0 = new Boundary(0, "(");
var bor0 = new Boundary(0, ")");
var bcl0 = new Boundary(0, "[");
var bcr0 = new Boundary(0, "]");
var bol1 = new Boundary(1, "(");
var bor1 = new Boundary(1, ")");
var bcl1 = new Boundary(1, "[");