Skip to content

Instantly share code, notes, and snippets.

View Maybach91's full-sized avatar
👁️
Whats poppin’?

Patrick Ludewig Maybach91

👁️
Whats poppin’?
View GitHub Profile
@ifuller1
ifuller1 / Code.gs
Last active February 16, 2023 21:23
For copying events between calendars
//import "google-apps-script";
const doCleanup = false;
const doSync = true;
const isProduction = true;
const debug = false;
const id = "[email protected]";
const tagName = "sourceId";
const copyTitle = true;
const preappendString = `Booked for ${id} - `;
@ByteSizedMarius
ByteSizedMarius / ExtractSavedPlacesGMaps.md
Last active February 4, 2025 01:40
Google Maps: Extract places from shared list

Edit: This doesn't work for lists > 20 items, because pagination does not work. Please see here

This script allows extracting name and coordinates for gmaps shared lists. It is incredibly unstable and may break anytime. Good luck figuring out why, because the syntax is extremely confusing and basically makes no sense at all. Thanks to google for not providing an api for this after LITERALLY 12 YEARS

How to use this script:

  1. Share a list and open the link in a browser window. It will redirect. The new link will look like this: google.com/maps/@<your coords>/data=....
  2. Take the data-portion and paste it into the following link: https://google.com/maps/@/data=?ucbcb=1
@loughlincodes
loughlincodes / youtube-video-thumbnail.liquid
Last active January 25, 2023 14:21 — forked from junaidkbr/youtube-video-thumbnail.liquid
Get Youtube video thumbnail from Youtube URL in Shopify Liquid
{% assign video_url = 'https://www.youtube.com/watch?v=R5jIoLnL_nE' %}
{% assign thumbnail_url = '' %}
{% assign video_id = video_url | split: '/' | last %}
{% assign video_id = video_id | split: '?' | last %}
{% assign video_id = video_id | split: 'v=' | last %}
{% if video_id != blank %}
{% assign thumbnail_url = 'http://img.youtube.com/vi/' | append: video_id | append: '/maxresdefault.jpg' %}
{% endif %}
/**
* ScrollMonitor
*/
const scrollMonitorScript = {
cfg: {
selectors: {
waypoint: '[waypoint]',
waypointTarget: '[waypoint-target]',
},
@junaidkbr
junaidkbr / youtube-video-thumbnail.liquid
Created April 5, 2020 23:58
Get Youtube video thumbnail from Youtube URL in Shopify Liquid
{% comment %} We assume that we have the youtube video in form of URL {% endcomment %}
{% assign video_url = 'https://www.youtube.com/watch?v=ScMzIvxBSi4' %}
{% assign thumbnail_url = '' %}
{% comment %} First of all, we get last part of the URL that's supposedly the Youtube Video ID {% endcomment %}
{% assign video_id = video_url | split: '/' | last %}
{% comment %} but we need strip any extra URL params {% endcomment %}
{% assign video_id = video_id | split: '?' | first %}
@stettix
stettix / things-i-believe.md
Last active May 4, 2025 13:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@bennadel
bennadel / snippet-1.sh
Last active April 18, 2020 12:58
My Opinionated git Cheat Sheet
git status
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active March 17, 2025 06:52
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
//
// Computed Property Names //
const foo = {name: 'tom', age: 30, nervous: false}
const bar = {name: 'tim', age: 30, nervous: false}
const baz = {name: 'loo', age: 30, nervous: true}
// BAD:
console.log(foo)
console.log(bar)
console.log(baz)
@jonathantneal
jonathantneal / detect-autofill.js
Created September 11, 2018 14:56
Detect autofill in Chrome, Edge, Firefox, and Safari
export default scope => {
// match the filter on autofilled elements in Firefox
const mozFilterMatch = /^grayscale\(.+\) brightness\((1)?.*\) contrast\(.+\) invert\(.+\) sepia\(.+\) saturate\(.+\)$/
scope.addEventListener('animationstart', onAnimationStart)
scope.addEventListener('input', onInput)
scope.addEventListener('transitionstart', onTransitionStart)
function onAnimationStart(event) {
// detect autofills in Chrome and Safari by: