Skip to content

Instantly share code, notes, and snippets.

View guillaumegarcia13's full-sized avatar
πŸ’­
Building awesome things πŸš€

GARCIA Guillaume guillaumegarcia13

πŸ’­
Building awesome things πŸš€
View GitHub Profile
@guillaumegarcia13
guillaumegarcia13 / _AHRC_CL_MCP_DYNAMIC.abap
Created June 22, 2025 16:12
Dynamic MCP server for ABAP class
"! <p class="shorttext synchronized" lang="en">HRC Software - MCP Server - Dynamic</p>
class /AHRC/CL_MCP_DYNAMIC definition
public
inheriting from ZCL_MCP_SERVER_BASE
final
create public .
public section.
types:
@guillaumegarcia13
guillaumegarcia13 / suivi-votes-loi-Duplomb
Created July 18, 2025 08:13
πŸ—³οΈ Suivi du nombre de votes de la pΓ©tition contre la loi Duplomb
(function(){if(!window.pc)window.pc={d:null,l:0,i:false};const c=window.pc,n=Date.now(),m=5*60*1000,r=(n-c.l)>=m;if(r&&!c.i){c.i=true;(async()=>{try{const res=await fetch('https://petitions.assemblee-nationale.fr/initiatives/i-3014');const html=await res.text();const doc=new DOMParser().parseFromString(html,'text/html');const el=doc.querySelector('#initiative-3014-votes-count > div.progress__bar__title > span.progress__bar__number');c.d={v:el?.textContent?.trim()||'N/A',t:new Date().toLocaleTimeString(),s:true};c.l=n;}catch(e){c.d={v:'Error',t:new Date().toLocaleTimeString(),s:false,e:e.message};c.l=n;}finally{c.i=false;}})();}return c.i?`πŸ”„ Loading...`:(c.d?`πŸ—³οΈ ${c.d.v} | ${c.d.t} | Next: ${new Date(c.l+m).toLocaleTimeString()}`:`⏳ Init...`);})();
@guillaumegarcia13
guillaumegarcia13 / angular-add-to-home-screen.component.ts
Created May 31, 2020 20:54 — forked from pnutmath/angular-add-to-home-screen.component.ts
Angular - Add to home screen POC (app.component.ts)
import { Component, HostListener } from '@angular/core';
@Component({
selector: 'app-root',
template: '<button (click)="addToHomeScreen()" *ngIf="showButton">Add to Home Scree</button>',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
deferredPrompt: any;
@guillaumegarcia13
guillaumegarcia13 / html_forms_cheatsheet.md
Created April 4, 2017 12:21
HTML forms and input tags cheatsheet. All you need to know to write every HTML form possible, including links to good resources on HTML and the new HTML5 form and input options...

HTML Forms

In order that you never go to W3Schools (never go there), here is a basic cheat sheet for writing simple HTML forms.

This is culled from a few sources, [the most important being MDN][MDN]. MDN (the Mozilla Developer Network) should be seen as "the docs" when you are having an issue with HTML.

@guillaumegarcia13
guillaumegarcia13 / sample.html
Created September 4, 2017 15:53
Angular 4 ng-template & ng-container with parameters
<ng-template #followingpost let-author="author" let-age="age" let-text="text" let-badge="badge">
<div class="container-fluid">
<div class="card">
<div class="header">
<h4 class="title">{{ author }}</h4>
<p class="category">il y a {{ age }} jours</p>
</div>
<div class="content" [innerHTML]="text">
</div>
@guillaumegarcia13
guillaumegarcia13 / rotate_emoji.css
Created October 30, 2021 08:06
Rotating emoji CSS
/* Animating with globe emoji */
@keyframes rotateEmoji {
0% { content: "\01F30D"; }
33% { content: "\01F30E"; }
66% { content: "\01F30F"; }
}
.my-own-tile .nepTileTitle .nepTileClickable::before {
content: "\01F30D";
}
.my-own-tile:hover .nepTileTitle .nepTileClickable::before {
@guillaumegarcia13
guillaumegarcia13 / groupBy.ts
Created January 12, 2018 23:39
groupBy in Typescript (for use in Angular)
declare global {
interface Array<T> {
groupBy(prop: T): Array<T>;
}
}
if (!Array.prototype.groupBy) {
Array.prototype.groupBy = (prop: string) => {
return this.reduce(function(groups, item) {
const val = item[prop];
@guillaumegarcia13
guillaumegarcia13 / elementor_carousel_custom_link.js
Created February 1, 2021 11:28
Elementor - Custom external links for Image Carousel
@guillaumegarcia13
guillaumegarcia13 / linkedin_profiles.js
Last active December 1, 2020 09:40
Retrieve all LinkedIn profiles of people leaving a comment
/*====================================================================================================================
* Author: Guillaume GARCIA (https://www.linkedin.com/in/guillaumegarcia/)
* Date : 30-november-2020
*
* Usage
* -----
*
* Go to a LinkedIn post URL
* such as: https://www.linkedin.com/feed/update/urn:li:activity:6738104526265446400/
* Open Chrome DevTools
@guillaumegarcia13
guillaumegarcia13 / gmail_to_slack.js
Created October 30, 2020 10:38 — forked from andrewmwilson/gmail_to_slack.js
Google Apps Script: Send Gmail emails to Slack
// You will also need to create a gmail filter to add the 'send-to-slack' label
// to any emails you want sent to slack
function sendEmailsToSlack() {
var label = GmailApp.getUserLabelByName('send-to-slack');
var messages = [];
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
messages = messages.concat(threads[i].getMessages())