Skip to content

Instantly share code, notes, and snippets.

1. Albanese government faces decisions on coalmines that could add 16m tonnes of CO2 emissions annually

The Australian government is facing decisions on whether to approve up to 28 coalmine projects, which could add 16 million tonnes of carbon dioxide emissions a year and a further 564 million tonnes a year if exported and burned in Asia. If all 28 projects

Image

2. ‘What’s wrong between men and women’: the thriller igniting debate about femicide

The Night of the 12th, a cold-case drama by Franco-German director Dominik Moll, has just won big at the César awards and has the nation talking about misogyny and murder. Moll's film is a fictional

<!DOCTYPE html><html lang="en-GB"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>@media screen{body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;cursor:pointer;font-size:inherit;opacity:.8;outline:none;padding:0;transition:opacity .2s linear}body[data-bespoke-view=""] .bespoke-marp-parent>.b
@neilellis
neilellis / 07-09-2016.md
Last active September 7, 2016 21:47
My DEV Journal

Today I added Zlib compression for the results of my Lambda functions, on the server:

 @Nullable
    private static String compress(@NotNull String serialized) throws UnsupportedEncodingException {
        byte[] input = serialized.getBytes("UTF-8");
        Deflater compresser = new Deflater();
        compresser.setInput(input);
        compresser.finish();
        byte[] output = new byte[input.length + 8000];
<!DOCTYPE html>
<html ng-app="example">
<head lang="en">
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.7/angular.js"></script>
</head>
<script>
@neilellis
neilellis / DocTest.java
Last active August 29, 2015 14:27
How to make sure you're Java examples in a README compiles and runs.
package com.sillelien.dollar;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import org.pegdown.Extensions;
import org.pegdown.PegDownProcessor;
import org.pegdown.ast.RootNode;
import java.io.File;
import java.io.IOException;

Install:

curl https://gist.githubusercontent.com/neilellis/41b1509bdf1636260c9a/raw/509e253297d031733474fd8dc373c93ca5c6b33e/dkr > ~/.dkr
echo ". ~/.dkr" >> ~/.bash_profile
@neilellis
neilellis / dns-hack.sh
Last active July 29, 2019 06:09
Fixes links on Alpine Linux
#!/usr/bin/with-contenv sh
if [ ! -f /etc/dnsmasq-resolv.conf ]
then
cp -f /etc/resolv.conf /etc/dnsmasq-resolv.conf
echo "nameserver 127.0.0.1" > /etc/resolv.conf
fi
while ! ps -ef | grep -v grep | grep dnsmasq-resolv.conf
do
sleep 1
@neilellis
neilellis / README.md
Last active December 7, 2019 22:51
An example Blue/Green deployment using Tutum and Cloudflare (for DNS)
@neilellis
neilellis / sanitized-stack.yml
Created May 20, 2015 11:50
Example tutum stack
lb:
image: 'tutum/haproxy:latest'
links:
- brochure
- render
- server
ports:
- '80:80'
restart: always
roles:
@neilellis
neilellis / cached-circle.yml
Last active August 29, 2015 14:19
Basic Circle.yml files for Tutum
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker"
override:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS tutum.co