Skip to content

Instantly share code, notes, and snippets.

View HerHde's full-sized avatar

Henrik Hüttemann HerHde

View GitHub Profile
@illuzor
illuzor / .gitlab-ci.yml
Last active March 6, 2024 18:29
Config for gitlab ci android with unit tests and instrumented tests
image: ubuntu:22.04
variables:
ANDROID_COMPILE_SDK: "33"
ANDROID_BUILD_TOOLS: "33.0.2"
EMULATOR_IMAGE: "24"
SDK_TOOLS: "9477386" # from https://developer.android.com/studio/#command-tools
before_script:
@ThibaultJanBeyer
ThibaultJanBeyer / read-only-couchdb.json
Created July 5, 2018 17:21
read only couchdb: add this to the design documents of the database you want to protect. Now, only users with role admin will be able to edit or add documents to this database.
{
"_id": "_design/auth",
"language": "javascript",
"validate_doc_update": "function(newDoc, oldDoc, userCtx) { if (userCtx.roles.indexOf('admin') !== -1) { return; } else { throw ({ forbidden: 'Only admins may edit the database' }); } }"
}
@PaulKinlan
PaulKinlan / monitorEvents.js
Created October 14, 2016 07:38
monitorEvents.js
function monitorEvents(element) {
var log = function(e) { console.log(e);};
var events = [];
for(var i in element) {
if(i.startsWith("on")) events.push(i.substr(2));
}
events.forEach(function(eventName) {
element.addEventListener(eventName, log);
});