Skip to content

Instantly share code, notes, and snippets.

@cblegare
cblegare / test_pytestcookies_with_context.py
Last active April 14, 2018 02:26
pytest-cookies with context
"""
Example of using pytest and pytest-cookies
for data driven testing of
cookiecutter templates
"""
from collections import OrderedDict
from pathlib import Path
@cblegare
cblegare / archstrap.sh
Last active July 24, 2017 11:57
Experimentations for encrypted system using dm-crypt.
#!/bin/sh
###
# Inspired by https://blog.urbanslug.com/posts/2016-09-11-dm-crypt-systemd-boot-and-efi-on-archlinux.html
###
#!/bin/sh
#
# a simple way to parse shell script arguments
<!DOCTYPE html>
<html>
<body>
<h1>External JavaScript</h1>
<p id="demo">A Paragraph.</p>
<button type="button" onclick="myFunction()">Try it</button>
@cblegare
cblegare / pretty_workflow_output
Created November 10, 2014 19:01
Advanced bash workflow output
#!/usr/bin/env bash
# Reset
color_off='\033[0m' # Text Reset
# Regular Colors
color_black='\033[0;30m' # Black
color_red='\033[0;31m' # Red
color_green='\033[0;32m' # Green
color_yellow='\033[0;33m' # Yellow
<?php
/**
* Repository factory replacement for generating repositories injected
* with dependencies using Doctrine and Symfony2.
*
* This is simply a proof of concept
*/
namespace Acme;