Skip to content

Instantly share code, notes, and snippets.

View foursixnine's full-sized avatar
♾️
Dreaming about maria cookies!

Santiago Zarate foursixnine

♾️
Dreaming about maria cookies!
View GitHub Profile
@foursixnine
foursixnine / gist:0aa50c8e5f95890ba99e72d356f1c5eb
Last active January 11, 2024 22:11
# QE Engineer Profile

QE Engineer Profile

Take the information here with a grain of salt, use update and notify if you make changes, or contact Santiago Zarate.

Bare Minimum

@foursixnine
foursixnine / stuff.pm
Created December 12, 2022 09:20
Perl static method call
package stuff;
use v5.30;
sub cc {
say 'hello!'.__PACKAGE__;
}
1;
@foursixnine
foursixnine / nginx.conf
Last active July 30, 2020 17:48 — forked from foxxyz/nginx.conf
Serve react app from current directory via nginx
# Extremely basic development setup to serve the current directory at http://localhost:9001
# Start nginx in this directory with `nginx -p . -c nginx.conf`
# Stop nginx with `nginx -p . -s stop`
# for opensuse: if running as a user, after running yarn build: `/usr/sbin/nginx -p . -c nginx.conf`
events {}
http {
# Serve files with correct mimetypes on OSX
# location may have to be adjusted depending on your OS and nginx install
include /usr/local/etc/nginx/mime.types;
# works
_cmd = "/home/foursixnine/Projects/suse.com/github.com/os-autoinst/openQA/script/client --host %s"
_cmd += " --apibase / --apikey %s --apisecret %s"
_cmd += " tests/%d/file/autoinst-log.txt get"
this_process = subprocess.run(_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
_output = this_process.stdout
# doesnt:
_cmd = "/home/foursixnine/Projects/suse.com/github.com/os-autoinst/openQA/script/client --host %s "
for job in $(cat jobs.list); do ./script/client --host openqa.suse.de jobs/${job##*/} delete; done;
@foursixnine
foursixnine / gist:b0d37109c71671303e5a874f7fdd9556
Last active November 9, 2019 10:38
Restart a job in an openQA instance
set -e
MICROTIME=$(date +%s);
APIKEY="APIKEY"
APISECRET="APISECRET"
APIROUTE='/api/v1/jobs/1748061/restart' # Beware if your URL has extra characters
# See https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/UserAgent.pm#L78
HMAC=$(echo -n "$APIROUTE$MICROTIME" | openssl dgst -sha1 -mac hmac -macopt key:$APISECRET | awk '{ print $2}');
@foursixnine
foursixnine / usb pimpinela
Created April 7, 2019 06:54
iPimpinella
[Vete ] usb 3-3: new full-speed USB device number 29 using xhci_hcd
[Por eso vete, olvida mi nombre, mi cara, mi casa ] usb 3-3: device descriptor read/64, error -71
[Y pega la vuelta ] usb 3-3: device descriptor read/64, error -71
[Jamás te pude comprender ] usb 3-3: new full-speed USB device number 30 using xhci_hcd
[Vete, olvida mis ojos ] usb 3-3: device descriptor read/64, error -71
[mis manos, mis labios ] usb 3-3: device descriptor read/64, error -71
[Que no te desean ] usb usb3-port3: attempt power cycle
[Estás mintiendo, ya lo sé ] usb 3-3: new full-speed USB device number 31 using xhci_hcd
[Vete, olvida que existo, que me conociste ] usb 3-3: Device not responding to setup address.
[Y no te sorprendas, olvida de todo que tú para eso ] usb 3-3: Device not responding to s
use strict;
use warnings;
use Test::More;
use Carp qw/carp/;
use feature 'say';
sub get_var {
my ($return_this) = @_;
## no critic
return undef if $return_this eq 'Blah';
@foursixnine
foursixnine / arrayref.pm
Last active December 17, 2018 09:31
pairprogramming
use strict;
use warnings;
use feature 'say';
use Data::Dump qw(pp);
# https://github.com/foursixnine/systeminstaller/blob/master/bootstrap-os.sh
# you could run all of this in a shell script
BOOTSTRAP_ROOTFS=/tmp/rootfs
mkdir ${BOOTSTRAP_ROOTFS}
mount -t ext3 -o noatime /dev/your/device ${BOOTSTRAP_ROOTFS}
mount -t proc proc ${BOOTSTRAP_ROOTFS}/proc/
mount -t sysfs sys ${BOOTSTRAP_ROOTFS}/sys/
mount -o bind /dev ${BOOTSTRAP_ROOTFS}/dev/