Skip to content

Instantly share code, notes, and snippets.

View gregjotau's full-sized avatar

greg taube gregjotau

  • Norway
View GitHub Profile
@gregjotau
gregjotau / merge-customer-profiles.py
Created October 1, 2023 17:18
merge customer profiles and fix wrong emails due to typos, shopify api
import json
import logging
from shopify_utils import get_store
logging.basicConfig(level=logging.INFO)
def generate_variations(domain, max_distance=2):
alphabet = "abcdefghijklmnopqrstuv"
variations = {domain}
@gregjotau
gregjotau / bulk-rename-attachment-airtable.js
Created April 11, 2023 14:28
Bulk rename attachments Airtable
let settings = input.config({
title: '📎⇣ Bulk attachment renamer',
description: 'rename all attachments in a table with the name based on multiple fields in the same record.',
items: [
input.config.table('tableWithAttachment', {
label: 'table with attachments to be renamed',
description: '',
}),
input.config.field('attachmentField', {
label: 'attachment that will be renamed',
@gregjotau
gregjotau / bootstrap_mac.sh
Last active March 9, 2023 13:39
bootstrap a mac
#!/usr/bin/env bash
if test ! $(which brew); then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Oh-my-zsh - zsh default shell on mac
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@gregjotau
gregjotau / bootstrap_windows.ps1
Last active August 11, 2019 08:09
bootstrap a windows machine for development or other purposes
# Install Chocolatey
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco feature enable -n allowGlobalConfirmation
#$Packages = 'git','googlechrome', 'adobereader', 'skype', 'filezilla', 'python', 'virtualbox',
# 'wireshark', 'fiddler', 'vlc', 'youtube-dl', 'jre8','jdk8', 'deluge','vagrant','visualstudiocode', '7zip.install'