Skip to content

Instantly share code, notes, and snippets.

View adam-rudd-myob's full-sized avatar

Adam Rudd adam-rudd-myob

  • MYOB
  • MYOB Melbourne
View GitHub Profile
@shaneog
shaneog / fb-ad-clean.js
Last active October 30, 2023 20:42
Clean Facebook Ad Preferences
// This script will remove all Interests and Advertisers from your Facebook profile
//
// Instructions
//
// Go to: https://www.facebook.com/ads/preferences/
//
// Open the browser console
//
// Paste the following code into the console and execute it
@dmkent
dmkent / pandas_holidays_australia_victoria.py
Created September 13, 2017 03:52
Pandas holiday definition for Victoria, Australia.
import pandas as pd
from pandas.tseries.holiday import (
Holiday, AbstractHolidayCalendar, next_monday,
MO, TU, FR, next_monday_or_tuesday,
GoodFriday, EasterMonday
)
class VictorianHolidays(AbstractHolidayCalendar):
rules = [
Holiday("New Year's Day", month=1, day=1, observance=next_monday),
@lambtron
lambtron / shopify.md
Last active October 23, 2023 17:48
segment event tracking for shopify
title sidebar
Segment Event Tracking for Shopify
Shopify

Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.

The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.


@savvot
savvot / ffmpeg-extract-keyframes.sh
Last active February 3, 2022 06:40
Extract only keyframes (I-frames) from video to images with console ffmpeg
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg
@alexanderlz
alexanderlz / col_desc.sql
Last active May 22, 2024 13:26
Get column description in postgresql/redshift
SELECT description FROM pg_catalog.pg_description WHERE objsubid =
(
SELECT ordinal_position FROM information_schema.columns WHERE table_name='YOUR_TABLE_NAME' AND column_name='YOUR_COLUMN_NAME'
)
and objoid =
(
SELECT oid FROM pg_class WHERE relname = 'YOUR_TABLE_NAME' AND relnamespace =
(
SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = 'public'
)