Skip to content

Instantly share code, notes, and snippets.

10 donate charity 0.007943817637577712
10 car covers 0.009440478931614092
10 hair extensions 0.009440478931614092
10 torch 0.010937140225650472
10 transport 0.013124568270780564
10 truck driver jobs 0.015196868524061708
10 low calorie beer 0.01577250748330647
10 background check 0.015887635275155423
10 multivitamin 0.015887635275155423
10 resume builder 0.01611789085885333
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:
@cldellow
cldellow / sampling-profiler.md
Last active October 7, 2019 06:43
A poor man's sampling profiler

So your JVM app is slow...

The background

Imagine that you've inherited this program:

import scala.util.Random

object SlowApp {
This is a sample file.
https://docs.google.com/presentation/d/1JJUsSbehWLUohBjyH2Dr9NKeIZlMHsw02vQY6LpTiyc/edit?usp=sharing
@cldellow
cldellow / fetch_page.py
Last active January 29, 2019 15:42 — forked from Smerity/fetch_page.py
An example of fetching a page from Common Crawl using the Common Crawl Index
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')

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

<span>(<span class="bday">1961-05-06</span>)</span>May 6, 1961<span class="noprint ForceAgeToShow">(age 56)</span>
<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>
@cldellow
cldellow / gist:d9e01f83bf78ba8c80f4e66433ed84b9
Last active November 29, 2017 19:41
using intellij idea.md
* 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