Skip to content

Instantly share code, notes, and snippets.

View tbarthelet's full-sized avatar

Thomas tbarthelet

  • Jura, France
View GitHub Profile
@tbarthelet
tbarthelet / MergeExcelSheets.vba
Created August 17, 2017 21:08
Merge Excel sheets into one
Option Explicit
Sub recap()
Dim ws As Worksheet
For Each ws In Worksheets
' // recap is the name of the sheet for merged data
If ws.Name <> "recap" Then
' // we suppose that the first row of each sheet contains again the same header line
ws.Range(ws.Range("A2"), _
ws.Range("A2").SpecialCells(xlCellTypeLastCell)).Copy _
Destination:=Worksheets("recap").Range("A65536").End(xlUp).Offset(1, 0)
@tbarthelet
tbarthelet / Wordpress-feeds-with-images.php
Last active August 15, 2017 18:19
Add posts images to all RSS feeds in Wordpress
<?php
/*
Plugin Name: RSS feeds with images
Description: Add posts images to all RSS feeds
Author: Thomas Barthelet
Version: 1.0
*/
// register the specific media XML namespace (http://www.rssboard.org/media-rss)
function add_media_namespace() {
@tbarthelet
tbarthelet / Wordpress-feed-from-events.php
Last active August 29, 2015 14:01
Create an XML RSS feed from calendar events posts in Wordpress
<?php
/*
Plugin Name: RSS feed from events
Description: Create a dedicated RSS feed from posts considered as events and which will occur in the future from now.
Author: Thomas Barthelet
Version: 1.3
*/
/* Define your custom parameters here */
$slug_name = "YOUR-SLUG-NAME"; // the feed will be accessible at domain.com/YOUR-SLUG-NAME