Skip to content

Instantly share code, notes, and snippets.

View printminion's full-sized avatar
💭
Time flies like an arrow; fruit flies like a 🍌

@printminion printminion

💭
Time flies like an arrow; fruit flies like a 🍌
View GitHub Profile
/*
Display only N models via CSS modification
https://cults3d.com/en/users/printminion/3d-models
In order to create screenshot for yearly overview
Injected via: https://chromewebstore.google.com/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld
Follow me on https://twitter.com/printminion
Buy me a coffee https://www.buymeacoffee.com/printminion
*/
body.body--top_bar {
@printminion
printminion / gtm-container-compare.py
Last active December 11, 2023 05:22
compare two gtm containers
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@desc Compare two Goolge Tag Manager containers
@author Misha M.-Kupriyanov https://google.com/+MishaMKupriyanov
@link https://gist.github.com/printminion/9cae259c6c7220ea1540
"""
@printminion
printminion / getColumnNrByName.js
Last active August 9, 2023 20:00
Google Apps Script for getting column number by column name
/**
* @desc This is an Google Apps Script for getting column number by column name
* @author Misha M.-Kupriyanov https://plus.google.com/104512463398531242371/
* @link https://gist.github.com/5520691
*/
function testGetColumnNrByName() {
var sheet = SpreadsheetApp.getActiveSheet();
Logger.log(getColumnNrByName_(sheet, '%COLUM_TITLE%'));
}
@printminion
printminion / SocialAPIServiceClient.gs
Last active September 8, 2022 00:48
Client Script for SocialAPIWebService
/**
* Client Script for SocialAPIWebService
* add this script to your spreadsheet and you will be able to get followers
* via formula e.g. =getTwitterCount(A2)
* Example: https://lh6.googleusercontent.com/-EPK-mUtK6-o/UWm_nEpo2UI/AAAAAAAAru0/20a0lk2nIiQ/s0/SocialAPIService.gif
* @author Misha M.-Kupriyanov <m.kupriyanov@gmail.com>
* @license Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
*/
/*
@printminion
printminion / getGooglePlusProfileId.js
Last active September 8, 2022 00:45
Google Apps Script for getting Google+ ProfileId by url
/**
* @desc This is an Google Apps Script for getting Google+ ProfileId by url
* @author Misha M.-Kupriyanov https://plus.google.com/104512463398531242371/
* @link https://gist.github.com/5520613
*/
function testGetGooglePlusProfileId() {
Logger.log('profileId:' + getGooglePlusProfileId('104512463398531242371'));
Logger.log('profileId:' + getGooglePlusProfileId('https://plus.google.com/u/0/+GoogleDevelopers/about'));
Logger.log('profileId:' + getGooglePlusProfileId('https://plus.google.com/u/1/+GoogleDevelopers/'));
/**
* @desc Script for sharing Calender with domain users.
* Shared calender will be visible in users Calender interface
*
* Warning: Before running this script enable Calendar API via Advanced Google Services
* https://developers.google.com/apps-script/guides/services/advanced
* @author Misha M.-Kupriyanov https://google.com/+MishaMKupriyanov
* @require Calendar API
* @link https://gist.github.com/printminion/cc23e0ae0e6119c77ec8
*/
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@printminion
printminion / DriveToCsv.php
Last active September 8, 2022 00:42
Download google drive spreadheet as csv
<?php
session_start();
define('SPREADSHEET_ID', '<YOUR_SPREADSHEET_ID_HERE>');
define('SPREADSHEET_SHEET_ID', '<YOUR_SPREADSHEET_SHEET_ID_HERE>');
$configurationFile = getcwd() . '/client_secret.json';
if (!file_exists($configurationFile)) {
echo 'please client_secret.json is not available. Please download it form https://console.developers.google.com/' . PHP_EOL;
@printminion
printminion / CheckSiteForText.js
Created October 14, 2017 08:39
Apps Script for testing site content and sending email
/** Apps Script for testing site content and sending email **/
function isSiteContainsString()
{
// Get the URL of the Website to monitor
var url = SpreadsheetApp.getActiveSheet().getRange("E2").getValue();
var stringToSearch = SpreadsheetApp.getActiveSheet().getRange("F2").getValue();
// HTTP Response Code of the last server request
@printminion
printminion / googleplus_to_spreadsheet.js
Last active September 8, 2022 00:35
App Script for fetching Google+ Profile data into the Google Docs spreadsheet
/**
* @desc This is an App Script for fetching Google+ Profile data (e.g. name and profile image) to
* the Google Docs spreadsheet
* @author Misha M.-Kupriyanov https://plus.google.com/104512463398531242371/
* @link https://gist.github.com/1919613
*
* 1) Get your Google+ API KEY and paste it instead of %YOUR_API_KEY%
* https://developers.google.com/+/api/oauth#apikey
* https://code.google.com/apis/console#access
* 2) Create and name your spreadsheet "profiles"