I'm not exactly sure what you mean by code snippet, however, you can easily see this information in the built-in reports: Reporting / All Reports / Page reports / Content inventory report.
If you look at the General Tab / Tables / Inventory Table / Edit , you can see the SQL query to get the data. From this, you could create a custom macro or function to get the values you are looking for.
SELECT NodeAliasPath AS 'Alias Path',
DocumentCulture AS 'Language',
DocumentName AS 'Name',
DocumentModifiedWhen AS 'Last modified',
UserName AS 'Last modified by',
StepDisplayName AS 'Workflow step',
DocumentPublishFrom AS 'Publish from',
DocumentPublishTo AS 'Publish to'
FROM View_CMS_Tree_Joined
LEFT JOIN CMS_User ON DocumentModifiedByUserID = UserID
LEFT JOIN CMS_WorkFlowStep ON DocumentWorkflowStepID = StepID
WHERE (@OnlyPublished = 0 OR ([DocumentCanBePublished] = @OnlyPublished AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] <= @CMSContextCurrentTime) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] >= @CMSContextCurrentTime)))
AND (NodeSiteID = @CMSContextCurrentSiteID)
AND (@ModifiedFrom IS NULL OR DocumentModifiedWhen >= @ModifiedFrom)
AND (@ModifiedTo IS NULL OR DocumentModifiedWhen < @ModifiedTo)
AND (NodeAliasPath LIKE @path)
AND (@Language IS NULL OR @Language = '-1' OR DocumentCulture = @Language)
AND (@name IS NULL OR DocumentName LIKE '%'+@name+'%')
ORDER BY NodeAliasPath