Skip to content

Instantly share code, notes, and snippets.

@bloodearnest
bloodearnest / selfsigned.py
Last active October 30, 2025 13:42
Create a self-signed x509 certificate with python cryptography library
# Copyright 2018 Simon Davy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
module StartAppTest where
import Html exposing (text, Html)
import StartApp
import Effects exposing (Effects)
import Time
import Signal exposing (Address)
type alias Model = Float
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - Where to Log -
log_destination = 'csvlog' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.
# This is a command configuration to be used with https://github.com/derhasi/buddy
commands:
# calls the global composer command from the root folder
composer:
cmd: composer
workingDir: $DIR
# Calls a local drush command in ./vendor/bin/drush
drush:
cmd: drush
cmdDir: $DIR/vendor/bin
@jerbob92
jerbob92 / ImageRenderExampleBlockByURI.php
Created October 28, 2015 13:21
Render image into a block Drupal 8 Example by URI
<?php
/**
* @file
* Contains Drupal\mymodule\Plugin\Block\ImageRenderExampleBlockByURI.
*/
namespace Drupal\mymodule\Plugin\Block;
use Drupal\Core\Block\BlockBase;
@mchavezi
mchavezi / Elm Gulp Config
Created October 20, 2015 18:11
Gulp file for compiling multiple Elm files.
var Path = require('path');
var Gulp = require('gulp');
var Elm = require('gulp-elm');
var Concat = require('gulp-concat');
var Newer = require('gulp-newer');
Gulp.task('elm-init', Elm.init);
Gulp.task('elm', ['elm-init'], function () {
@benmirkhah
benmirkhah / gulpfile.js
Last active February 9, 2016 09:40
Drupal Omega 4 Libsass & Livereload Gulp file
/*
First time usage needs the following dependencies installed:
sudo npm install --save-dev del gulp gulp-plumber gulp-sass gulp-watch gulp-autoprefixer gulp-debug gulp-css-globbing gulp-livereload gulp-order gulp-sourcemaps gulp-svg2png gulp-newer gulp-size
bower init
bower install susy --save
bower install sass-toolkit --save
bower install breakpoint-sass --save
*/
//Source / Destination / Path settings
@webbj74
webbj74 / init-org.el
Created September 22, 2015 20:00
org-mode file+function capture template example
;; I am not a regular emacs user and haven't played with lisp for many years.
;; I struggled for a couple of days trying to tweak org-capture-templates to
;; get my desired behavior for journal entries. I hope this helps someone!
;;
;; I have been following the excellent guide http://doc.norang.ca/org-mode.html
;; The "journal" template was the one I wanted to tweak. I use a date-based
;; journal filename, e.g. "2015-09-22-Journal-Entry.org". The contents of the
;; file consist of a top-level headline with a human-friendly date, followed
;; by second-level headline with the time and brief journal note. For example:
;;
@miohtama
miohtama / droneio.bash
Created August 26, 2015 22:58
drone.io continuous integration + Python 3.4 + Selenium + SSH key setup for private repos + codecov coverage
#!/bin/bash
#
# Setup test running for Ubuntu 12.02 / Drone IO
#
# As drone.io build command put:
#
# # Launch the droneio test script from the repo
# bash bin/droneio.bash # Whereever you put this script in your source code control
#
#
import Html exposing (div, button, text, input, node)
import Html.Events exposing (onClick)
import Html.Attributes exposing (type', class)
import StartApp
main =
StartApp.start { model = model, view = view, update = update }
model = []