Skip to content

Instantly share code, notes, and snippets.

View lotas's full-sized avatar
🏠
Working from home

Yarik lotas

🏠
Working from home
View GitHub Profile
@lotas
lotas / queue_migration.sql
Last active September 14, 2023 16:22
taskcluster queue migration
-- assist easier future migration, add readable columns to azure_queue_messages
alter table azure_queue_messages
add column task_queue_id text null, -- expose cryptic names
add column priority int null, -- don't forget about the priority
add column payload jsonb null; -- instead of base64 encoded string use jsonb
-- patch functions to use new columns
CREATE OR REPLACE FUNCTION public.azure_queue_put_extra(queue_name text, message_text text, visible timestamp without time zone, expires timestamp without time zone, task_queue_id text, priority int, payload jsonb)
@lotas
lotas / README.md
Last active February 8, 2023 18:38
make taskclsuter api calls from command line. Depends on 'hawk' package to generate auth headers

Little helper to call Taskcluster api calls in command line

Main problem that auth uses HAWK which requires libraries to calculate hmac of the authorization header

Usage in shell:

tc_api POST queue/v1/task '{payload here'}

tc_api GET auth/v1/ping

Worker Versions

Generic Worker

Total: 23

Count by version:

@lotas
lotas / taskcluster-tasks.md
Last active June 28, 2023 15:25
Taskcluster important features backlog

Taskcluster H2 Planning 2022

Developer Experience

  • Write blog posts to describe how to use TC
  • For developers and community:
    • ! easy to install (dumb defaults that work right of the box)
    • ! easy to deploy (include external services/ ingress/certbot) (FCP-50, FCP-51) (terraform)
    • ! easy to bootstrap new repo integration: quickstart /sample configs
  • ! simple steps to run it locally: docker-compose / kind / include documentation

Keybase proof

I hereby claim:

  • I am lotas on github.
  • I am lotask (https://keybase.io/lotask) on keybase.
  • I have a public key ASDBuLZ35wSiEoudq33lE9fcwwv_yNxYimN5YyhMmp4ySQo

To claim this, I am signing this object:

@lotas
lotas / render.js
Created September 29, 2017 12:05
render.js
/* global phantom, console */
'use strict';
var system = require('system');
if (system.args.length < 3) {
console.error('I need more arguments: render-image [template] [outputFilename]');
phantom.exit(1);
}
var page = require('webpage').create();
@lotas
lotas / str2int.c
Created March 28, 2017 09:55
strtoint.c colors
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
if (argc < 2) {
printf("No input\n");
return 1;
}
{
"VCALENDAR": [
{
"VERSION": "2.0",
"PRODID": "-//f1timing v1.0//EN",
"NAME": "Formula One Official Calendar",
"X-WR-CALNAME": "Formula One Official Calendar",
"VEVENT": [
{
"UID": "f1cal48@formula1.com",
@lotas
lotas / kurento-crash.trace
Last active March 17, 2016 12:02
Kurento media server 6.4.1 segfault
--- stack trace ---
#0 0x00007fc243a50cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 14973
selftid = 18597
#1 0x00007fc243a540d8 in __GI_abort () at abort.c:89
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7fc2240d8840, sa_sigaction = 0x7fc2240d8840}, sa_mask = {__val = {2, 18628, 140472386274647, 5, 0, 0, 140472335076648, 140471980504576, 18628, 11, 140472386303253, 0, 140472372118602, 0, 140471980499680, 6}}, sa_flags = 0, sa_restorer = 0x1}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00000000005188f1 in safe_abort () at /opt/kurento/kurento-media-server/server/death_handler.cpp:299
#!/bin/bash
# Git post checkout hook.
# Reminds you of South migration changes when switching branches.
# Can be useful when you are when you are testing out a branch from
# someone else that requires migrations.
# Put the file in .git/hooks/post-checkout
PREVIOUS_HEAD=$1
NEW_HEAD=$2