Skip to content

Instantly share code, notes, and snippets.

View tnntwister's full-sized avatar

François-Xavier Guillois tnntwister

View GitHub Profile
@kerma
kerma / convert_flac_to_aac.sh
Last active April 20, 2024 07:00
Convert all flac files in folder to m4a using ffmpeg and libfdk_aac
# on os x use brew to get ffmpeg with libfdk_aac
brew install ffmpeg --with-fdk-aac
# convert and use m4a as file extension
find . -name '*.flac' -exec sh -c 'ffmpeg -i "$1" -c:a libfdk_aac -b:a 320k "${1%.flac}.m4a"' _ {} \;
@loilo
loilo / split-pull-requests.md
Last active April 3, 2024 07:24
Split a large pull request into two
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 3, 2024 17:43
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@ethanclevenger91
ethanclevenger91 / programmatically-add-tribe-event-ticket.php
Last active November 24, 2023 14:46 — forked from barryhughes/programmatically-add-woocommerce-etp-ticket.php
Programmatically add a Tribe Events Calendar event with tickets and attendee meta
<?php
$event_id = tribe_create_event( [
'post_title' => 'My Event',
// see https://docs.theeventscalendar.com/reference/functions/tribe_create_event/ for full arguments
] );
$provider = \Tribe__Tickets__Tickets::get_event_ticket_provider();
$ticket_id = $provider::get_instance()->ticket_add( $event_id, [