Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Daniel Pereira kriansa

🏠
Working from home
View GitHub Profile
@cyphar
cyphar / how-to-pgp-release.md
Last active Dec 16, 2019
Document describing how to create PGP-signed releases of projects.
View how-to-pgp-release.md

Creating Releases with PGP Signatures

Aleksa Sarai

Creating a release of a free software project with PGP signatures is quite simple, especially if you have everything set up already. This guide uses GnuPG, but it should be roughly applicable to OpenPGP or other implementations. For completeness, I've included a (very) short introduction to how to create a PGP key and how PGP works.

Introduction

@whitlockjc
whitlockjc / example.el
Created Mar 9, 2016
Emacs linum-format that works around whitespace-mode and padding
View example.el
;; Linum mode
(global-linum-mode t)
;; Custom face/function to pad the line number in a way that does not conflict with whitespace-mode
(defface linum-padding
`((t :inherit 'linum
:foreground ,(face-attribute 'linum :background nil t)))
"Face for displaying leading zeroes for line numbers in display margin."
:group 'linum)
@johnbintz
johnbintz / simple-capistrano-docker-deploy.rb
Last active Aug 7, 2019
Simple Capistrano deploy for a Docker-managed app
View simple-capistrano-docker-deploy.rb
# be sure to comment out the require 'capistrano/deploy' line in your Capfile!
# config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'my-cool-application'
# the base docker repo reference
set :name, "johns-stuff/#{fetch(:application)}"
@mojavelinux
mojavelinux / atom-fedora-20.adoc
Last active Apr 1, 2020
Instructions for building and launching the Atom text editor on Fedora 20.
View atom-fedora-20.adoc

Using Atom on Fedora 20

This guide walks you through the steps of building and launching the Atom text editor on Fedora 20.

Building Atom

  1. Install prerequisite packages

@dhrrgn
dhrrgn / typecheck.php
Last active Aug 29, 2015
PHP Type Check Function
View typecheck.php
<?php
/**
* Checks the type of the given value against an array of valid types.
*
* If the value is a valid type, `true` is returned, if not, an
* InvalidArgumentException is thrown.
*
* // Throws: Invalid type: string, Expected type(s): array, ArrayAccess
* checktype('foo', ['array', 'ArrayAccess']);
@zsup
zsup / ddd.md
Last active Jun 27, 2020
Documentation-Driven Development (DDD)
View ddd.md

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.
View backend.conf
server {
listen 80;
server_name backend;
root /usr/share/nginx/www;
index index.html index.html;
location / {
header_filter_by_lua '
@konklone
konklone / Dockerfile
Created Sep 22, 2013
Dockerfile for installing Ruby 2.0 and RVM
View Dockerfile
FROM ubuntu
MAINTAINER Eric Mill "eric@konklone.com"
# turn on universe packages
RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list
RUN apt-get update
# basics
RUN apt-get install -y nginx openssh-server git-core openssh-client curl
RUN apt-get install -y nano
@dhrrgn
dhrrgn / iter.php
Created Aug 1, 2013
(WIP) Functions creating iterators for looping, based off the python itertools module.
View iter.php
<?php
/**
* Functions creating iterators for looping, based off the python itertools
* module.
*
* @author Dan Horrigan <dan@dhorrigan.com>
* @license MIT License
* @copyright 2013 Daniel Horrigan
*/
namespace iter;
@edenfall
edenfall / js-array-sort.js
Last active Jan 31, 2019
Implements selection, bubble, insertion, quick and heap sort algorythms in Array prototype
View js-array-sort.js
/*
(c) 2010~2013 Alessandro Ramos dos Santos
edenfall@gmail.com
This file implements selection, bubble, insertion, quick and heap sort algorythms in Array prototype.
It adds a swap() method for use with these algorythms.
Hope you like it. :)
Forgive my bad English. :(
You can’t perform that action at this time.