Skip to content

Instantly share code, notes, and snippets.

View marcobeltempo's full-sized avatar
👨‍💻

Marco Beltempo marcobeltempo

👨‍💻
View GitHub Profile
@marcobeltempo
marcobeltempo / google_meet_raise_hand_alert.js
Last active April 12, 2023 13:08
A Tampermonkey script to prevent accidentally raising your hand during a Google Meet call
// ==UserScript==
// @name Google Meet Raised Hand Alert
// @namespace https://github.com/marcobeltempo
// @version 0.1
// @description A Tampermonkey script to prevent accidentally raising your hand during a Google Meet call
// @author Marco Beltempo
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @match https://meet.google.com/*
// @downloadURL https://gist.githubusercontent.com/marcobeltempo/1e31de4f9cabc52016a7e10ea06e9a28/raw/google_meet_raise_hand_alert.js
@marcobeltempo
marcobeltempo / github-gmail-filters.xml
Last active April 14, 2020 14:32
GitHub Gmail Filters
<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:apps="http://schemas.google.com/apps/2006">
<title>Mail Filters</title>
<!-- Labels assigned tasks with "gh-assigned" -->
<entry>
<category term="filter"></category>
<title>Mail Filter</title>
<content></content>
<apps:property name="from" value="notifications@github.com" />
<apps:property name="hasTheWord" value="cc:assign@noreply.github.com OR cc:author@noreply.github.com" />
@marcobeltempo
marcobeltempo / lab11_test_case1.js
Created January 6, 2018 01:56
Lab 11 Test Case
var img = new Image(100, 100);
img.src = 'https://i2.wp.com/www.marcobeltempo.com/wp-content/uploads/2016/05/mb_logo_38x38.png?fit=38%2C38&amp;ssl=1';
document.body.appendChild(img);
img.onload = function() {
document.getElementsByTagName("body")[0].style.backgroundColor = "red";
}
img.onerror = function() {
alert("Error");
};
img.src = 'https://i2.wp.com/www.marcobeltempo.com/wp-content/uploads/2016/05/mb_logo_38x38.png?fit=38%2C38&amp;ssl=1'
@marcobeltempo
marcobeltempo / lab11_case.js
Last active January 6, 2018 01:58
Lab 11 Test Case Example
var img = document.querySelector('#image-1234');
img.onload = function loaded() {
...
};
img.src = "http://some.url.com/image";
...
//Somewhere late in the code I set the URL to the same thing again
img.src = "http://some.url.com/image";
//I'd expect the onLoad event to fire a second time, but it doesn't always in this case!
@marcobeltempo
marcobeltempo / looop_vect_v2.c
Created December 10, 2017 00:55
The second loop will enable the gcc compiler to use auto-vectorization
//gcc -O3 -fopt-info-vec-missed=loop_vect_v2.miss loop_vect_v2.c -o loop_vect_v2
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define MAX_ARRAY_SIZE 1000
int main() {
int* array1 = calloc(MAX_ARRAY_SIZE,sizeof(int));
@marcobeltempo
marcobeltempo / loop_vect_v1.c
Created December 10, 2017 00:51
The first loop will enable the gcc compiler to use auto-vectorization
//gcc -O3 -fopt-info-vec-missed=loop_vect_v1.miss loop_vect_v1.c -o loop_vect_v1
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
int array1[1000];
int array2[1000];
long array3[1000];
@marcobeltempo
marcobeltempo / loop_vect_v0.c
Last active December 10, 2017 00:50
The following c loop will not enable the gcc compiler for auto-vectorization
//gcc -O3 -fopt-info-vec-missed=loop_vect_v0.miss loop_vect_v0.c -o loop_vect_v0
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
int array1[1000];
int array2[1000];
long array3[1000];
@marcobeltempo
marcobeltempo / README.md
Created December 8, 2017 04:58
README.md Template

GitHub Logo

Project Title

Brief overview of your project

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

List the minimum requirements and tools needed to run your program

@marcobeltempo
marcobeltempo / aarch_9_loop.s
Created November 26, 2017 23:17
aarch_9_loop
.text
.globl _start
start = 0 /* starting value for the loop index; note that this is a symbol (constant), not a variable */
max = 10 /* loop exits when the index hits this number (loop condition is i<max) */
ten = 10
_start:
mov x19, start
mov x22, ten
@marcobeltempo
marcobeltempo / aarch_30_loop.s
Created November 20, 2017 03:43
9 count loop - aarch64 assembler
.text
.globl _start
start = 0 /* starting value for the loop index; note that this is a symbol (constant), not a variable */
max = 31 /* loop exits when the index hits this number (loop condition is i<max) */
ten = 10
_start:
mov x19, start
mov x22, ten