Skip to content

Instantly share code, notes, and snippets.

@marcelgruber
marcelgruber / github-tips-and-tricks.markdown
Last active March 8, 2019 00:50
Github Tips and Tricks

Github Tips and Tricks

Did you know that Github, since being acquired by Microsoft, now supports unlimited private repos?

You can import Bitbucket repos simply by providing a clone URL AND IT ADDS ALL OF THOSE CONTRIBUTIONS TO YOUR PROFILE, IN CHRONOLOGICAL ORDER!

Contribution Settings

Now that you've imported your private repos into Github (BitBucket is crying right now), let's bolster up your contribution stats.

@marcelgruber
marcelgruber / laravel-spark-setup-checklist.markdown
Last active March 8, 2019 00:21
If you're building a new Laravel application and leveraging Laravel Spark, this guide will be VERY helpful to you.

Laravel Spark Site Setup Checklist

@marcelgruber
marcelgruber / [[...path]].ts
Last active January 29, 2023 13:42
NextJS Sitecore JSS Layout Service Response Shortcut URL
// This code makes it easier to ping your layout service without having to remember the long URL that is accessible by default.
// Add this file to /pages/api/viewpage or wherever you want.
// From there, all you need to do is visit /api/viewpage to view the layout service response for your home page
// Subpage would be /api/viewpage/someSubPage
// Note that this will be PUBLICLY VIEWABLE, so make sure to lock it down somehow, possibly with this or WAF rules:
// https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-user-and-page-for-testing-sitecore-authentication.html
import type { NextApiRequest, NextApiResponse } from 'next';
const handler = async (req: NextApiRequest, res: NextApiResponse): Promise<void> => {
@marcelgruber
marcelgruber / DbRefreshUpdateItemValsWithEnvironmentSelector.ps1
Created July 20, 2023 16:37
Database Refresh Post Step For Item Field Value Updates With Environment Selector
$options = @{
"DEV"="DEV"
"STAGE"="STAGE"
}
$props = @{
Parameters = @(
@{Name="selectedOption"; Title="Choose an environment"; Options=$options}
)
Title = "Environment selector"