Skip to content

Instantly share code, notes, and snippets.

View viki53's full-sized avatar
🏠
Working from home

Corentin Hatte viki53

🏠
Working from home
View GitHub Profile
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
@jgillman
jgillman / 1-Info.md
Created January 3, 2019 23:01
Automated certbot renew for Mac with launchd (launchctl)

Automatic certbot renew on a Mac

It seems like everyone is using cron for setting up certbot renew on Macs but I couldn't find anyone doing it with launchd. The other file in this Gist is the service file.

The documentation on the Let's Encrypt site actually recommends having it run twice a day (12 hours apart) but I've found that once a day is more than sufficient since if it fails it still has another 29 days to succeed.

@viki53
viki53 / extract_toc.php
Created April 21, 2020 12:43
PHP Table Of Content extracting
<?php
require_once('./url_title.php');
require_once('./xss_clean.php');
if (!function_exists('extract_toc')) {
function extract_toc(DOMDocument $dom, int $max_level = 6) {
$xpath = new DOMXPath($dom);
$xpath->registerNamespace('html', 'http://www.w3.org/1999/xhtml');
$max_level = min(max($max_level, 1), 6); // Les titres en HTML vont de h1 à h6 maximum
@neonexus
neonexus / Update Lambda@Edge Function.md
Last active January 28, 2022 13:39
Update Lambda@Edge Function

First, zip up your function:

rm lambda.zip; zip -r lambda.zip lambda-function/*

Then, update the current working function:

aws lambda update-function-code --zip-file fileb://lambda.zip --function-name LambdaFunctionName
@viki53
viki53 / Arc Boost
Last active March 13, 2024 10:03
ZdS largeur fixe
https://arc.net/boost/86FB313B-210C-49D5-8D51-A0CD7ACEFA31
@viki53
viki53 / firefox-stylus.user.css
Last active January 3, 2022 13:41
TweetDeck centered
/* ==UserStyle==
@name tweetdeck-centered
@namespace tweetdeck.twitter.com
@description Center TweetDeck's columns on large screens
@version 1.0.3
@author Corentin Hatte (https://www.github.com/viki53)
@homepageURL https://gist.github.com/viki53/57f3a84bb629487f0568a741957d475d
@updateURL https://gist.githubusercontent.com/viki53/57f3a84bb629487f0568a741957d475d/raw/firefox-stylus.user.css
@preprocessor default
==/UserStyle== */
@viki53
viki53 / firefox-stylus.user.css
Last active September 6, 2022 08:06
LinkedIn distraction-free
/* ==UserStyle==
@name linkedin-no-distraction
@namespace linkedin.com
@description Remove most distractions on LinkedIn
@version 1.0.3
@author Corentin Hatte (https://www.github.com/viki53)
@homepageURL https://gist.github.com/viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc
@updateURL https://gist.github.com/viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc/raw/firefox-stylus.user.css
@preprocessor default
==/UserStyle== */