Skip to content

Instantly share code, notes, and snippets.

View mvaled's full-sized avatar
🏠
Working

Manuel Vázquez Acosta mvaled

🏠
Working
  • Merchise Autrement
  • Cuba
  • X @mvaled
View GitHub Profile
@mvaled
mvaled / builddist.sh
Last active October 30, 2023 09:15
A file to build OpenERP 7.0/8.0 distributions.
#!/bin/sh
# Build OpenERP 7.0 and 8.0 sdists.
#
# You MUST place this in the root of your odoo repository. It expects you
# have the local branches 7.0 and any other you may use.
#
# Usage:
#
# ./builddist.sh [BRANCH] [VERSION]
@mvaled
mvaled / redis_pubsub_demo.rb
Created July 2, 2011 22:28 — forked from pietern/redis_pubsub_demo.rb
Simple demo to showcase Redis PubSub with EventMachine (modified to work with latests Cramp)
# Author: Pieter Noordhuis
# Modified (very lightly) by Manuel Vázquez Acosta in order to make it work with Cramp after commit https://github.com/lifo/cramp/commit/968e9030f253f74c94562555f3244aad4fe03e89
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
#
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.8.0-mva-final Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@mvaled
mvaled / impl.v
Created May 26, 2016 16:01
Proof that '(p -> q -> z) <-> ((p /\ q) -> z)'.
Section ImplicationProof.
Variables p q z : Prop.
Lemma T1: (p -> q -> z) -> ((p /\ q) -> z).
intros L P.
elim P.
trivial.
Save.
@mvaled
mvaled / fanstatic-core.patch
Created April 15, 2013 20:15
Possible fix (rather hackish)
diff -r 68d58cdd5004 fanstatic/core.py
--- a/fanstatic/core.py Wed Mar 27 07:16:35 2013 -0400
+++ b/fanstatic/core.py Mon Apr 15 16:12:43 2013 -0400
@@ -1063,12 +1063,17 @@
def consolidate(resources):
# keep track of rollups: rollup key -> set of resource keys
potential_rollups = {}
+ used_rollups_depends = {} # resource key -> rollup
for resource in resources:
for rollup in resource.rollups:
@mvaled
mvaled / gitprompt.py
Created May 17, 2012 14:47
Simple file to be placed in IPython's conf dir to allow prompts to include the git branch and status.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gitprompt.py
#
# Copyright 2012 Manuel Vázquez Acosta <mva DOT led AT google-mail-address-here.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@mvaled
mvaled / UsbSnoop.log
Created November 26, 2012 04:07
SniffUSB log
[7 ms] UsbSnoop - FilterAddDevice(dc50b748) : DriverObject 8512c5a8, pdo 866bd2d0
[11 ms] UsbSnoop - FilterDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_QUERY_LEGACY_BUS_INFORMATION)
[11 ms] UsbSnoop - FdoHookDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_QUERY_LEGACY_BUS_INFORMATION)
[12 ms] UsbSnoop - FilterDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_QUERY_RESOURCE_REQUIREMENTS)
[12 ms] UsbSnoop - FdoHookDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_QUERY_RESOURCE_REQUIREMENTS)
[12 ms] UsbSnoop - FilterDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
[12 ms] UsbSnoop - FdoHookDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
[12 ms] UsbSnoop - FilterDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_START_DEVICE)
[12 ms] UsbSnoop - FdoHookDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_START_DEVICE)
[406 ms] UsbSnoop - FilterDispatchPnp(dc50b45c) : IRP_MJ_PNP (IRP_MN_QUERY_INTERFACE)
@mvaled
mvaled / is_this_a_bug.html
Created September 24, 2012 17:01
Fragment interaction with CSS.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>FF 15.0.1 Bug?</title>
<meta name="description" content="Shows a bug if FF 15.0.1" />
<meta name="author" content="Manuel Vazquez Acosta" />
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
@mvaled
mvaled / renames_files.py
Created September 11, 2012 19:32
Normalizes files titles in a Plone instance
import transaction, pdb
from zope.interface import implementedBy
from zope.component import getUtility, queryUtility, queryAdapter
from Zope2 import debug
from Acquisition import aq_inner, aq_parent, aq_chain
from zope.app.component.hooks import setSite, getSiteManager
from Testing.makerequest import makerequest
from AccessControl.SecurityManagement import newSecurityManager, getSecurityManager
@mvaled
mvaled / module.rb
Created October 4, 2011 03:09
Ejemplo de módulos en Ruby. Ver post: http://manuelonsoftware.wordpress.com/?p=225
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
# Mostly stealed from ActiveSupport
class Module
# Encapsulates the common pattern of:
#
# alias_method :foo_without_feature, :foo
# alias_method :foo, :foo_with_feature
#