Skip to content

Instantly share code, notes, and snippets.

View aperezdc's full-sized avatar
🛋️
Couch-potatoing

Adrian Perez aperezdc

🛋️
Couch-potatoing
View GitHub Profile
@aperezdc
aperezdc / flatedecode.py
Created August 17, 2013 11:34
Simple flate decoder, can be used e.g. for compression object streams in PDF files
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2013 Adrian Perez <aperez@igalia.com>
# Distributed under terms of the MIT license.
import zlib
import sys
@aperezdc
aperezdc / buildroot-config-wpe
Last active July 29, 2019 19:51
Buildroot configuration to build WPE with WebRTC enabled
#
# Automatically generated file; DO NOT EDIT.
# Buildroot 2017.02-rc1-12213-gb8bb78c99 Configuration
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_5=y
BR2_HOST_GCC_AT_LEAST_4_6=y
BR2_HOST_GCC_AT_LEAST_4_7=y
BR2_HOST_GCC_AT_LEAST_4_8=y
BR2_HOST_GCC_AT_LEAST_4_9=y
@aperezdc
aperezdc / CMakeLists.txt
Last active July 25, 2019 22:38
CMake madness
cmake_minimum_required (VERSION 2.8)
# projectname is the same as the main-executable
project(pctest)
find_package(PkgConfig)
pkg_check_modules(PC one)
message("PC_INCLUDE_DIRS ... ${PC_INCLUDE_DIRS}")
message("PC_CFLAGS ......... ${PC_CFLAGS}")
message("PC_CFLAGS_OTHER ... ${PC_CFLAGS_OTHER}")
@aperezdc
aperezdc / PKGBUILD-j4status-git.sh
Last active February 10, 2019 17:32
Updated PKGBUILD for the j4status-git package
# Maintainer: Moritz Maxeiner <moritz@ucworks.org>
pkgname=j4status-git
pkgver=445.8c017e4
pkgrel=1
pkgdesc="A plugin-based status line generator: j4status generates a status line to use with bar programs (like i3bar). It is plugin-based to allow anyone to extend it easily."
arch=('i686' 'x86_64')
url='https://sardemff7.github.io/j4status/'
license=('GPL')
provides=('j4status')
@aperezdc
aperezdc / PKGBUILD-hotdoc.sh
Created January 7, 2019 13:57
Updated PKGBUILD for HotDoc 0.8.103
# Copyright 2018 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
/*
* Spinlock based on Qt atomic operations. Should be fairly portable.
* To use it, it is recommended to use the SpinLock::Acquire helper
* class to follow RAII patterns, e.g.:
*
* static SpinLock g_myLock;
* // ...
*
* void foo() {
* do_seomething();
@aperezdc
aperezdc / .autoenv.zsh
Created August 24, 2017 12:07
Autoenv snippet for WebKit source trees
#
# Place this in the root directory of a WebKit source tree.
#
# This needs the following Zsh plug-ins:
#
# https://github.com/Tarrasch/zsh-autoenv
# https://github.com/aperezdc/virtualz
#
autostash WEBKIT_TOP_LEVEL="${0:A:h}"
@aperezdc
aperezdc / PKGBUILD.tartan-git.sh
Created August 22, 2017 18:36
Arch Linux PKGBUILD for Tartan
# Maintainer: TingPing <tingping@tingping.se>
pkgname='tartan-git'
pkgver=0.3.0.r14.g5d9a499
pkgrel=1
pkgdesc='Clang analysis plugin for GLib and GNOME'
url='https://www.freedesktop.org/software/tartan/'
arch=('i686' 'x86_64')
provides=('tartan')
conflicts=('tartan')
license=('GPL3')
@aperezdc
aperezdc / jhenv.sh
Created March 3, 2017 13:02
Run a shell (or a command) using an alternate prefix, inspired by JHBuild
#! /bin/bash
# vim: set ts=4 sw=4 noet
#
# jhenv
# Copyright (C) 2017 Adrian Perez <aperez@igalia.com>
#
# Distributed under terms of the MIT license.
#
set -e
@aperezdc
aperezdc / .autoenv.zsh
Created November 2, 2016 17:22
Autoenv scripts to prepare an Android build environment in a directory
# Needs "curl", "sha1sum", some basic shell tools,
# plus the following Zsh plugins installed:
#
# https://github.com/Tarrasch/zsh-autoenv
# https://github.com/aperezdc/virtualz
#
# Drop this file into a new directory as .autoenv.zsh
# and enter it to have a virtualenv configured to use
# for building Android, and the "repo" tool installed
# and ready to be used. Bonus: ccache is configured.