Affichage des articles dont le libellé est github. Afficher tous les articles
Affichage des articles dont le libellé est github. Afficher tous les articles

mardi 20 février 2024

[video] So You Think You Know Git - FOSDEM 2024

 Scott Chacon's FOSDEM 2024 talk on Git Tips and Tricks.



https://www.youtube.com/watch?v=aolI_Rz0ZqY&t=4s



Scott talks about:


00:00 - Introduction

01:06 - About Me (well, Scott Chacon)

02:36 - How Well Do You Know Git?

05:09 - Our Agenda

06:25 - Some Helpful Config Stuff

09:42 - Oldies But Goodies

16:22 - Some New Stuff (You May Not Have Noticed)

23:48 - Some Big Repo Stuff / Monorepo Stuff

33:29 - Some New Github Stuff

35:54 - GitButler


36:50 - End of talk

37:03 - Start of Q&A Session

37:06 - Q: Why does GitHub not do git range diff?

38:28 - Q: Why do submodules suck everywhere?

40:16 - Q: With SSH signing, is it possible to specify more than one key?

40:42 - Q: Why can't --force-with-lease be the default force?

42:33 - Q: If you were back on the Git development team, what direction would you like to see it move in?

44:58 - Q: We all love the Git CLI - but do you ever use any visual tools?

46:41 - That's all folks!-

mercredi 17 janvier 2024

Conventional Commits specification

 https://www.conventionalcommits.org/en/v1.0.0/

The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.



for example, to be used with commitlint : 

https://github.com/conventional-changelog/commitlint 



example, on gitlab-ci : https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/85#587d266bb27a4dc3022bbed44dfa19849df3044c


or, at changelog level :

https://github.com/conventional-changelog/conventional-changelog


also cf. commitzen  :

https://github.com/commitizen/cz-cli

vendredi 26 mai 2017

GMAIL - Google Script - auto delete old (junk) mail

Today I discovered the "google scripts" that allow you to run some sophisticated actions on the various "google apps"/"cloud apps". This includes Gmail, Google drive, etc.

Let's start with gmail since I have some needs I could not fit into the pretty basic filters that can be defined directly from the UI.


Context :
* I am able to identify labels are "search" (defined at the time the mail arrives) on my mailbox, that I want to delete after a certain period of time.

For instance, I might be interested in some promotions sent by some companies I have reductions cards with, but after X days, it's of no use and it's only taking precious space in my inbox.

* I do not wish to delete them directly, the "usual" trash with 30 days retention period is fine enought.

* I want to have this run every night.

1. Go to  https://script.google.com

2. Enter this script :

  • set the variable delayDays
  • set the variable mySearch accordingly to your needs.
Version 2017 (old)

function cleanUp() {
  /**
  * @var    delayDays int   : Enter # of days before messages are moved to trash
  * @var    mySearch string : Enter the search as tested in Gmail search bar.
  */
  var delayDays = 30 ;
  var mySearch =  'label:online_store-totoStore OR from:bonsplans@newsletter.travel.com .com OR label:paris-freecycle';
  
  //-- code
  var maxDate = new Date();
  maxDate.setDate(maxDate.getDate()-delayDays);
  var tmp_threads = GmailApp.search(mySearch);
  var threads = [];
  var threads = threads.concat(tmp_threads);

  for (var i = 0; i < threads.length; i++) {
    if (threads[i].getLastMessageDate()
      {
        threads[i].moveToTrash();
      }
  }
}



EDIT 2020 : https://github.com/copolycube/GmailPurgeEmailsMatchingQuery
new version with same features plus :
  • array of simplier queries to find
  • does multiple search instead of 1 massive one
  • concatenates a "avoid deletion", for example to keep "starred" e-mail (by default)


3. Set it up to run every night :
 3.1 : select the 'clock/trigger'.
 3.2 : add the desired triggers on the popup window that will appear.




Other solution (easier)

Use regular Gmail filters triggering deletions, but with search keys like :
older_than:6m

example :  find all promotions older than 1y that haven't been starred

category:promotions older_than:1y -label:starred