Skip to content

Instantly share code, notes, and snippets.

View guilhermechapiewski's full-sized avatar

Guilherme Chapiewski guilhermechapiewski

View GitHub Profile
@guilhermechapiewski
guilhermechapiewski / gist:6066682
Created July 23, 2013 22:21
Creates a "git lg" alias that displays a pretty nicely formatted git log output.
git config --global alias.lg=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@guilhermechapiewski
guilhermechapiewski / tpb_booking_customizations.js
Last active April 13, 2025 17:26
2peaksbikes.com Ecwid customization script to show our Booxi appointment booking widget properly.
var foundDynElements = false;
var dynElementsInterval = null;
var tpbBookingOpen = false;
const tpbStartInterval = function() {
if ((foundDynElements == false) && (!dynElementsInterval)) {
dynElementsInterval = setInterval(function(){
tpbAttachBookingLink();
}, 500);
}
Ecwid.OnAPILoaded.add(function() {
Ecwid.OnPageLoaded.add(function(page) {
if (page.type == "PRODUCT") {
console.log(
`
Page loaded!
Ecwid store ID is: ${Ecwid.getOwnerId()}
Product ID is: ${page.productId}
`
)