Skip to content

Instantly share code, notes, and snippets.

View ArnaudLigny's full-sized avatar
👨‍💻
Solving problems

Arnaud Ligny ArnaudLigny

👨‍💻
Solving problems
View GitHub Profile
@barryels
barryels / export-google-podcasts-subscription-list-to-opml.js
Last active November 17, 2023 14:25
Export Google Podcasts subscription list to OPML
// 1. Visit https://podcasts.google.com/subscriptions
// 2. Open your browser's JavaScript console
// 3. Copy-paste the below snippet and press enter:
console.log(`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<opml version="1.0">
<head>
<title>Google Podcasts Feeds</title>
</head>
<body>
@Karobwe
Karobwe / 00 - how-to-use-twig-embed-tag.md
Last active March 20, 2024 10:23
Showcase on how to use Twig's embed tag (supposing a Symfony app with Tailwind)

While working on a complex HTML structure, to facilitate readability of my Twig template, I divided my file onto many partial templates. In most case it's working well, but sometimes you need to use Twig blocks defined in partial templates across many files. But include will not let you overriding blocks defined in partial template, when extanding the main template.

To solve this, Twig provide the embed tag, but it took me some times to figure out how to use it. So here a little reminder, with the usecase on embed's doc.

preview vertical layout

@Liozon
Liozon / Edge add-on badge.md
Last active August 16, 2022 21:47
Edge "Get the add-on" badge

Badge "Get it for Microsoft Edge"

Why ?

This is a custom made badge to add on websites or pages where you link your new extension or add-on for the new Edge. This custom badge "Get it for Microsoft Edge" was made since MS doesn't have an official one yet, other than "Get it from Microsoft".

Terms of use

Feel free to use it, but please give credit for the work, thank you !

Author: Julien Muggli

@DavidWells
DavidWells / netlify-plugins.md
Last active January 2, 2022 01:49
Netlify Plugin Spec

Simple plugin

Here is a simple plugin with no config and it runs on a single lifecycle event postBuild

// Plugin code
@daviddarnes
daviddarnes / gulpfile.js
Last active June 10, 2023 01:17
Import your Ghost posts into a Jekyll project using Gulp
const File = require('vinyl');
const gulp = require("gulp");
const Handlebars = require('handlebars');
const streamArray = require('stream-array');
const ghostContentAPI = require("@tryghost/content-api");
const api = new ghostContentAPI({
url: 'https://demo.ghost.io',
key: '22444f78447824223cefc48062',
version: "v4"
@kantoniak
kantoniak / FigureExtParsedown.class.php
Last active November 26, 2021 09:22
Parsedown extension to wrap single-image lines in <figure>, not <p>. Public domain. See https://github.com/erusev/parsedown/issues/180#issuecomment-451486639
<?php
class FigureExtParsedown extends Parsedown {
// Matches Markdown image definition
private $MarkdownImageRegex = "~^!\[.*?\]\(.*?\)$~";
public function __construct () {
// Add blockFigure to non-exclusive handlers for text starting with !
$this->BlockTypes['!'][] = 'Figure';
@nhoizey
nhoizey / browsing-contexts.js
Last active May 28, 2021 15:31
Get screen density and viewport width, useful for responsive web design
// get device pixel ratio in dppx
// https://github.com/ryanve/res/blob/master/res.js
var screen_density =
typeof window == 'undefined'
? 0
: +window.devicePixelRatio ||
Math.sqrt(screen.deviceXDPI * screen.deviceYDPI) / 96 ||
0
// keep only 3 decimals: http://jsfiddle.net/AsRqx/
screen_density = +(Math.round(screen_density + 'e+3') + 'e-3')
@sebasten
sebasten / E32018.md
Last active February 12, 2024 22:02
Planning E3 2018

E3 2018

Vidéos de jeux (par date) | Vidéos de jeux (par ordre alphabétique) | Liens utiles | Une question, une remarque, un truc que j'ai oublié ? DM @netsabes

Le planning des confs au format .ics pour l'ajouter à votre 📆 agenda est ici.

Tous les horaires sont indiqués à l'heure de Paris.

⚠️ Quelques conseils de survie (parce que bon, c'est des jeux vidéo et on fait des blagues sur Twitter, mais c'est aussi du travail à des horaires pénibles) : évitez de perdre votre nuit à tout regarder en direct, ça ne sert pas à grand chose et au réveil on peut voir les mêmes vidéos. Si vous le faites quand même, évitez de manger trop gras, buvez de

@blattmann
blattmann / Git: Empty branch.md
Last active June 12, 2024 18:09
Git: Create empty branch

Replace empty-branch with your desired branch name.

git checkout --orphan empty-branch

Then you can remove all the files you'll have in the staging area (so that they don't get committed):

git rm -rf .

At this point you have an empty branch, on your machine.

@sebasten
sebasten / E32017.md
Last active August 12, 2019 22:52
E3 2017