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
" Plugins {{{ | |
call plug#begin() | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
call plug#end() | |
"}}} | |
" Search for word under the cursor | |
nnoremap <silent> <leader>* :Rg! <C-R><C-W><CR> | |
nnoremap <leader>/ :Rg! |
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
defmodule ParamerizedTest do | |
use ExUnit.Case | |
@parameters [ | |
{0, 0}, | |
{1, 1}, | |
{2, 4}, | |
{3, 9}, | |
] | |
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: "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 |
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
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 | |
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
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); | |
} |
I hereby claim:
- I am damonkelley on github.
- I am damonkelley (https://keybase.io/damonkelley) on keybase.
- I have a public key ASCA0GEpmSYI7DSeQvtxDpXClWY8TfI2TxxC1fKEWzDzrAo
To claim this, I am signing this object:
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
# 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 |
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 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 |
NewerOlder