Skip to content

Instantly share code, notes, and snippets.

View jbergstroem's full-sized avatar

Johan Bergström jbergstroem

View GitHub Profile
@jbergstroem
jbergstroem / patch.diff
Created March 6, 2014 22:39
nginx-1.4.4.ebuild -> nginx-1.4.6.ebuild
diff --git nginx-1.4.4.ebuild nginx-1.4.6.ebuild
index a687f24..7ac8e12 100644
--- nginx-1.4.4.ebuild
+++ nginx-1.4.6.ebuild
@@ -37,15 +37,15 @@ HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progr
HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
-HTTP_HEADERS_MORE_MODULE_PV="0.22"
+HTTP_HEADERS_MORE_MODULE_PV="0.25"
@jbergstroem
jbergstroem / patch.diff
Created March 6, 2014 22:49
Add IUSE=snapshot to nodejs 0.11
--- a/nodejs-0.11.11.ebuild 2014-02-26 17:22:35.000000000 +1100
+++ b/nodejs-0.11.11.ebuild 2014-03-07 09:44:22.154698013 +1100
@@ -18,7 +18,7 @@
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
-IUSE="+npm"
+IUSE="+npm +snapshot"
RDEPEND="dev-libs/openssl"
@jbergstroem
jbergstroem / foo.diff
Created March 13, 2014 07:05
fix type warning
diff --git src/_pylibmcmodule.c src/_pylibmcmodule.c
index 98ec2f0..6cae4ef 100644
--- src/_pylibmcmodule.c
+++ src/_pylibmcmodule.c
@@ -2212,7 +2212,7 @@ static int _key_normalized_obj(PyObject **key) {
static int _key_normalized_str(char **str, Py_ssize_t *size) {
/* libmemcached pads max_key_size with one byte for null termination */
if (*size >= MEMCACHED_MAX_KEY) {
- PyErr_Format(PyExc_ValueError, "key length %d too long, max is %d",
+ PyErr_Format(PyExc_ValueError, "key length %zd too long, max is %d",
@jbergstroem
jbergstroem / untitled
Created March 21, 2014 10:17
lua-cmsgpack-9999.ebuild
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit toolchain-funcs multilib git-2
DESCRIPTION="A self contained Lua MessagePack C implementation"
HOMEPAGE="https://github.com/antirez/lua-cmsgpack"
@jbergstroem
jbergstroem / post.jinja
Created March 31, 2014 01:10
post macro
{# A macro that creates a post for the front page #}
{% macro post(post, class=false, image_type="adaptive_content", show_meta=true) %}
{% set share = "shares" %}
{% set share_count = post.social.total %}
{%- if post.social.total == 0 -%}
{% set share_count = "No" %}
{%- elif post.social.total == 1 -%}
{% set share_count = "One" %}
{% set share = "Share" %}
@jbergstroem
jbergstroem / foo.py
Created April 6, 2014 05:00
pylibmc 1.3.0 pypy 2.0.2 test failure
* pypy2_0: running distutils-r1_run_phase python_test
........E.................
======================================================================
ERROR: test_touch (tests.test_client.ClientTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/pylibmc-1.3.0/work/pylibmc-1.3.0/tests/test_client.py", line 14, in wrapper
return test(*args, **kwargs)
File "/var/tmp/portage/dev-python/pylibmc-1.3.0/work/pylibmc-1.3.0/tests/test_client.py", line 71, in test_touch
ok_(self.mc.touch("touch-test", 5))
@jbergstroem
jbergstroem / foo.diff
Created April 28, 2014 06:40
nginx-1.{6,7}.0.ebuild
g2 nginx # diff -u /usr/portage/www-servers/nginx/nginx-1.5.13.ebuild nginx-1.7.0.ebuild
--- /usr/portage/www-servers/nginx/nginx-1.5.13.ebuild 2014-04-15 16:11:59.000000000 +1000
+++ nginx-1.7.0.ebuild 2014-04-28 16:38:12.968848240 +1000
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.5.13.ebuild,v 1.1 2014/04/15 06:11:59 dev-zero Exp $
+# $Header: $
EAPI="5"
ranlib build/linux2/cc_x86_64-pc-linux-gnu-gcc/cxx_x86_64-pc-linux-gnu-g++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/usev8/mongo/s/libmetadata.a
x86_64-pc-linux-gnu-g++ -o build/linux2/cc_x86_64-pc-linux-gnu-gcc/cxx_x86_64-pc-linux-gnu-g++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/usev8/mongo/mongod -fPIC -pthread -Wl,-O1 -Wl,--as-needed -Wl,-z,now -rdynamic build/linux2/cc_x86_64-pc-linux-gnu-gcc/cxx_x86_64-pc-linux-gnu-g++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/usev8/mongo/db/db.o build/linux2/cc_x86_64-pc-linux-gnu-gcc/cxx_x86_64-pc-linux-gnu-g++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/usev8/mongo/db/commands/touch.o build/linux2/cc_x86_64-pc-linux-gnu-gcc/cxx_x86_64-pc-linux-gnu-g++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/usev8/mongo/db/mongod_options_init.o -L/usr/lib64 -L/lib64 -Wl,--start-group build/linux2/cc_x86_64-pc-linux-gnu-gcc
@jbergstroem
jbergstroem / foo.ebuild
Last active August 29, 2015 14:01
gunicorn-18.0-r1.ebuild
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0 )
inherit distutils-r1 eutils
DESCRIPTION="A WSGI HTTP Server for UNIX"
dependencies:
@npm install -s
@npm prune -s
update-deps:
@echo "Updating dependencies..\c";
@rm -rf npm-shrinkwrap.json node_modules
@npm install --silent --no-optional >/dev/null
@npm prune --silent >/dev/null
@npm dedupe --silent >/dev/null