Skip to content

Instantly share code, notes, and snippets.

Vítor Brandão noisebleed

Block or report user

Report or block noisebleed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am noisebleed on github.
  • I am noiselabs (https://keybase.io/noiselabs) on keybase.
  • I have a public key ASBKwekwhwRMvNONRMd2CQ50n58V2BzpoJt1EMCStORI7Ao

To claim this, I am signing this object:

@noisebleed
noisebleed / phpunit.xml
Created Feb 16, 2016
PHPUnit config for a ZF2 app.
View phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors = "true"
convertErrorsToExceptions = "true"
convertNoticesToExceptions = "true"
convertWarningsToExceptions = "true"
processIsolation = "false"
stopOnFailure = "true"
syntaxCheck = "true"
bootstrap = "vendor/autoload.php">
@noisebleed
noisebleed / ghost-upgrade.py
Created Dec 11, 2014
Ghost upgrade script (Python)
View ghost-upgrade.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Vítor Brandão <vitor@noiselabs.org>
import subprocess
from contextlib import closing
import glob
import os
import requests
@noisebleed
noisebleed / python-exec2.original.py
Created Nov 21, 2014
/usr/lib64/python-exec/python-exec2
View python-exec2.original.py
#!/usr/lib/python-exec/python-exec2-c
# vim:fileencoding=utf-8:ft=python
# (c) 2012 Michał Górny
# Released under the terms of the 2-clause BSD license.
#
# This is not the script you are looking for. This is just a wrapper.
# The actual scripts of this application were installed with -python*,
# -pypy* or -jython* suffixes. You are most likely looking for one
# of those.
@noisebleed
noisebleed / python-exec
Created Nov 21, 2014
/usr/lib64/python-exec/python-exec2 (broken)
View python-exec
#!/usr/bin/python2.7
# EASY-INSTALL-ENTRY-SCRIPT: 'Sphinx==1.1.3','console_scripts','sphinx-autogen'
__requires__ = 'Sphinx==1.1.3'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('Sphinx==1.1.3', 'console_scripts', 'sphinx-autogen')()
)
@noisebleed
noisebleed / python-exec2.broken.py
Last active Aug 29, 2015
/usr/lib64/python-exec/python-exec2 (broken)
View python-exec2.broken.py
#!/usr/bin/python2.7
# EASY-INSTALL-ENTRY-SCRIPT: 'Sphinx==1.1.3','console_scripts','sphinx-autogen'
__requires__ = 'Sphinx==1.1.3'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('Sphinx==1.1.3', 'console_scripts', 'sphinx-autogen')()
)
View keybase.md

Keybase proof

I hereby claim:

  • I am noisebleed on github.
  • I am noiselabs (https://keybase.io/noiselabs) on keybase.
  • I have a public key whose fingerprint is 3AAB E94B 277F 7D44 29AB 4318 9944 5351 2250 E987

To claim this, I am signing this object:

@noisebleed
noisebleed / GlobalVariablesContainer.php
Created Mar 14, 2014
SmartyBundle - Assign variables to every template
View GlobalVariablesContainer.php
<?php
namespace Vendorx;
class GlobalVariablesContainer
{
protected $vars;
public function __construct($three = 3)
{
View gist:5323678
$ ./app/console
PPI version 2.1.0-DEV - development/debug
Usage:
[options] command [arguments]
Options:
--help -h Display this help message.
--quiet -q Do not output any message.
--verbose -v Increase verbosity of messages.
@noisebleed
noisebleed / overlay.py
Created Jul 28, 2012
Portage API - Return all packages available in given Overlay [Gentoo Linux]
View overlay.py
import portage
from gentoolkit.package import Package
def get_all_packages(overlay_path):
"""Returns all packages from a given overlay path.
"""
packages = {}
porttree = portage.db[portage.root]['porttree']
vartree = portage.db[portage.root]['vartree']
You can’t perform that action at this time.