This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
# Based on http://djangosnippets.org/snippets/1158/ | |
import json | |
import re | |
from django.conf import settings | |
from django.http import HttpResponse, HttpResponseRedirect | |
class EnforceLoginMiddleware(object): | |
""" |
db: | |
image: mysql:latest | |
volumes_from: | |
- data | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: db_user | |
MYSQL_PASSWORD: db_password | |
MYSQL_DATABASE: db_name |
import logging | |
from rest_framework import serializers | |
class GeneralModelSerializer(serializers.ModelSerializer): | |
""" General model serializer that will serialize a model object. It will return all the model fields. | |
""" | |
class Meta: | |
model = None |
# specs and cukes results are stored in JUnit format under test-reports | |
if (grep 'failures="[^0]"' test-reports/* || grep 'errors="[^0]"' test-reports/*); then | |
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "failure", "description": "Failed!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null | |
else | |
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "success", "description": "Success!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null | |
fi |
I hereby claim:
To claim this, I am signing this object:
public class Pipeline<T> { | |
private final T value; | |
public Pipeline(T value) { | |
this.value = value; | |
} | |
public static <T> Pipeline<T> with(T value) { | |
return new Pipeline<T>(value); | |
} |
defmodule ChangeMaker do | |
@coins [50, 25, 10, 5, 1] | |
def change(n) do | |
@coins | |
|> Enum.zip([0, 0, 0, 0, 0]) | |
|> Enum.into(%{}) | |
|> change(n) | |
end |
version: "3" | |
services: | |
compose: | |
image: docker/compose:1.18.0 | |
volumes: | |
- ./:/app | |
command: -H tcp://docker:2375 -f /app/docker-compose.test.yml up | |
links: | |
- dind:docker |
defmodule ParamerizedTest do | |
use ExUnit.Case | |
@parameters [ | |
{0, 0}, | |
{1, 1}, | |
{2, 4}, | |
{3, 9}, | |
] |