Skip to content

Instantly share code, notes, and snippets.

View bucket.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Create an S3 bucket and IAM user with access to that bucket.
Resources:
S3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub ${AWS::StackName}-${AWS::AccountId}
BucketEncryption:
ServerSideEncryptionConfiguration:
View gist:3ea73e55f1af7201b42600bfd43b255f
https://docs.google.com/presentation/d/1JJUsSbehWLUohBjyH2Dr9NKeIZlMHsw02vQY6LpTiyc/edit?usp=sharing
@cldellow
cldellow / fetch_page.py
Last active Jan 29, 2019 — forked from Smerity/fetch_page.py
An example of fetching a page from Common Crawl using the Common Crawl Index
View fetch_page.py
import gzip
import json
import requests
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
# Let's fetch the Common Crawl FAQ using the CC index
resp = requests.get('http://index.commoncrawl.org/CC-MAIN-2015-27-index?url=http%3A%2F%2Fcommoncrawl.org%2Ffaqs%2F&output=json')
View examples.md

https://github.com/pmcinnis263/challenge

False negatives (NO_MATCH -> model)

Pentax K-x

listing manufacturer: Pentax
        title:        Pentax K-x Digital SLR Camera - Chocolate (Single Lens Kit  18-55mm)
        price:        449.99 GBP

our answer:       pentax_k-x

manufacturer: Pentax

View george-clooney-born.html
<span>(<span class="bday">1961-05-06</span>)</span>May 6, 1961<span class="noprint ForceAgeToShow">(age 56)</span>
View george-clooney.html
<table class="infobox biography vcard">
<tbody>
<tr>
<th colspan="2"><span class="fn">George Clooney</span></th>
</tr>
<tr>
<td colspan="2">
<a href="/wiki/File:George_Clooney_2016.jpg" class="image"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/8/8d/George_Clooney_2016.jpg/220px-George_Clooney_2016.jpg" width="220" height="284" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/8d/George_Clooney_2016.jpg/330px-George_Clooney_2016.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/8/8d/George_Clooney_2016.jpg 2x"></a>
<div>Clooney in September 2016</div>
</td>
View gist:d9e01f83bf78ba8c80f4e66433ed84b9
* download from https://www.jetbrains.com/idea/download/#section=linux
* I used community edition
* untar and run `bin/idea.sh`
* Import new project from `~/src/tng/pom.xml`
* Accept all the defaults. It'll warn about not having an SDK.
* Open scalaconfig/src/main/scala/com/snapsort/config/ConfigLoader.scala
View nix-links.md
View nix-thesis.md

Nix thesis

I read https://nixos.org/~eelco/pubs/phd-thesis.pdf, which outlines Nix, a “functional” package manager.

It motivates the need for new take on package management by analogy to memory management in programming languages.

It contrasts how software deployment works today (“Fuck it, I’m sure /usr/bin/local/python is a reference to a python 2.7.12 install with PIL available”) to how we used to write software (“Fuck it, I’m sure 0x7FEA6072 is the address of the array of files; so clearly, assuming a 32-bit address space, the seventh file is at 0x7FEA608A.”)

In both cases, as long as your assumption was correct, things go swimmingly. But it could be easier and rely less on hoping your assumptions are correct.