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
func DisableCachingAndSniffing(next http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate;") | |
w.Header().Set("pragma", "no-cache") | |
w.Header().Set("X-Content-Type-Options", "nosniff") | |
next.ServeHTTP(w, r) | |
}) | |
} |
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
# Create an IAM role for the Web Servers. | |
resource "aws_iam_role" "web_iam_role" { | |
name = "web_iam_role" | |
assume_role_policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "sts:AssumeRole", | |
"Principal": { |
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 "math" | |
import "fmt" | |
func DFT_naive (input []float64) ([]float64, []float64) { | |
real := make([]float64, len(input)) | |
imag := make([]float64, len(input)) | |
arg := -2.0*math.Pi/float64(len(input)) | |
for k := 0; k < len(input); k++ { |
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" | |
"net/http" | |
) | |
templ page() { | |
<!DOCTYPE html> |
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" | |
"net/http" | |
) | |
templ page(data any) { | |
<!DOCTYPE html> | |
<html> |
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
import React from 'react'; | |
import { shallow } from 'enzyme'; | |
const Item = text => <p>Item {text}</p>; | |
const Composition = ({ showB }) => ( | |
<p> | |
<Item text="A" /> | |
{showB && <Item text="B" />} | |
</p>); |
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
<!-- | |
Usage: | |
```md | |
--- | |
layout: two-cols-header | |
--- | |
This shows up across both | |
::left:: | |
# Left | |
This shows on the left |
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
import com.mongodb.MongoClient; | |
import com.mongodb.client.MongoCollection; | |
import org.bson.Document; | |
import org.mongodb.morphia.AdvancedDatastore; | |
import org.mongodb.morphia.Morphia; | |
import org.mongodb.morphia.logging.MorphiaLoggerFactory; | |
import org.mongodb.morphia.logging.slf4j.SLF4JLoggerImplFactory; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
We can't make this file beautiful and searchable because it's too large.
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
repo_name | |
jaredwilkening/goconfig | |
piger/dulbecco | |
zemirco/uuid | |
kevinburke/sll | |
fd0/probe | |
maciekmm/go-steam | |
pyros2097/gdx | |
JalfResi/gobeanstalk | |
whosthatknocking/runc |
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
version: 0.2 | |
env: | |
parameter-store: | |
build_ssh_key: "build_ssh_key" | |
phases: | |
install: | |
commands: | |
- mkdir -p ~/.ssh |
NewerOlder