Skip to content

Instantly share code, notes, and snippets.

View jpigla's full-sized avatar
🌤️
doing something

Jan-Philipp Igla jpigla

🌤️
doing something
View GitHub Profile
@jpigla
jpigla / flip_all_images_bookmarklet.js
Created September 15, 2020 20:31
😄 Bookmarklets with fun
javascript: (function () {
["", "-ms-", "-webkit-", "-o-", "-moz-"].map(function (prefix) {
Array.prototype.slice
.call(document.querySelectorAll("img"))
.map(function (el) {
el.style[prefix + "transform"] = "rotate(180deg)";
});
});
})();
@jpigla
jpigla / auto_scroll_bookmarklet.js
Last active July 8, 2021 00:17
Bookmarklet to Autoscroll Webpages (with commands)
javascript: (function () {
let _ss_interval_pointer;
let _ss_speed = 1;
let _ss_speed_pairs = [
[0, 0],
[1, 200.0],
[1, 120.0],
[1, 72.0],
[1, 43.2],
[1, 25.9],
@jpigla
jpigla / a_core-web-vitals_bookmarklet.js
Last active September 24, 2021 13:46
Bookmarklet to see metrics of Core Web Vitals and elements in DevConsole
javascript:%20(function%20()%20%7B%20%20%20%20%20%20%20%20%20%20%20%20const%20myStringOfstyles%3D%20%60%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.ttb-lcp-candidate%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20outline:%204px%20dashed%20goldenrod%20!important%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20outline-offset:%20-4px%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%60%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20style%20%3D%20document.createElement(%27style%27)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20style.innerText%20%3D%20myStringOfstyles%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20document.head.appendChild(style)%3B%20%20%20%20%20%20%20%20%20%20%20%20function%20sendToHolder(%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name,%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20delta,%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20verdict%20%20%20%20%20%20%20%20%20%20%20%20%7D)%20
const puppeteer = require('puppeteer');
const devices = require('puppeteer/DeviceDescriptors');
var fs = require('fs');
const mergeImg = require('merge-img');
const ampToolboxCacheUrl = require('amp-toolbox-cache-url').createCacheUrl;
const Good3G = {
'offline': false,
'downloadThroughput': 1.5 * 1024 * 1024 / 8,
'uploadThroughput': 750 * 1024 / 8,
# Python collection
#
#
# list from list without empty values
list_clean = [x for x in list_orig if str(x) != 'nan']
# Start Setup for Jupyter Notebooks
import pandas as pd
import numpy as np
import re
import matplotlib.pyplot as plt
%matplotlib inline
from IPython.display import display as dpl
# Pandas options
pd.set_option('display.max_colwidth', None)
# Make a separate list for each airline
x1 = list(flights[flights['name'] == 'United Air Lines Inc.']['arr_delay'])
x2 = list(flights[flights['name'] == 'JetBlue Airways']['arr_delay'])
x3 = list(flights[flights['name'] == 'ExpressJet Airlines Inc.']['arr_delay'])
x4 = list(flights[flights['name'] == 'Delta Air Lines Inc.']['arr_delay'])
x5 = list(flights[flights['name'] == 'American Airlines Inc.']['arr_delay'])
# Assign colors for each airline and the names
colors = ['#E69F00', '#56B4E9', '#F0E442', '#009E73', '#D55E00']
names = ['United Air Lines Inc.', 'JetBlue Airways', 'ExpressJet Airlines Inc.'',
@jpigla
jpigla / daily_SI_Sistrix_GAS_Sheets_DataStudio_SEO.js
Last active March 2, 2023 13:03
Get daily visibiliy index from Sistrix with Google Sheets, GAS & DataStudio
function daily_si() {
const sistrix_key = 'XXX';
// Führe die Funktion 'append_date' aus, welche das heutige Datum in die Datumsspalte schreibt.
append_date();
let ss_si_data = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Tägliche Sichtbarkeit');
let cell_wip = ss_si_data.getRange('A2');
@jpigla
jpigla / dynamically-add-faq-schema-to-your-content.js
Last active May 6, 2020 20:58
dynamically add faq schema to your content
// h/t: https://pastebin.com/WzrQanMx
// Define the class for your questions and answers here.
// They should be marked up in a consistent manner.
var questionClass = 'question';
var answerClass = 'answer';
// Output schema to console. Set to `false` if adding via tag manager.
var logOutput = false;
@jpigla
jpigla / check_position_sistrix_api.js
Last active March 2, 2023 13:03
Google Apps Script (GAS) - Check Position & URL with Sistrix API in Google Spreadsheet
function check_position_sistrix_api() {
const sistrix_key = 'XXX';
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('check position with sistrix');
// Werte (Domain, Device) werden eingelesen
let domain = sheet.getRange('H7').getValue();
let device = sheet.getRange('H8').getValue();