Skip to content

Instantly share code, notes, and snippets.

View andpiazza's full-sized avatar

Andre Piazza andpiazza

View GitHub Profile
@palumbo
palumbo / Download Images.gs
Created June 9, 2022 23:55
The code I used to download images into a Google Sheets cell or download images into a Google Drive folder.
function insertImage() {
let sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
let lastRow = sheet.getLastRow();
for (let i = 0; i < lastRow-1; i++) {
let url = sheet.getRange(2+i,1).getValue();
let image = SpreadsheetApp.newCellImage().setSourceUrl(url);
sheet.getRange(2+i,2).setValue(image);
}
@tanaikech
tanaikech / submit.md
Last active February 2, 2024 09:54
Updated Specification of Google Spreadsheet: Multiple Hyperlinks to a Cell

Updated Specification of Google Spreadsheet: Multiple Hyperlinks to a Cell

Recently, it seems that the specification of Google Spreadsheet was updated. Before this, when a cell has only one hyperlink. In this case, the hyperlink was given to a cell using =HYPERLINK("http://www.google.com/", "Google") as following figure.

But by the recent update, a cell got to be able to have multiple hyperlinks as following figure. In this case, the hyperlinks are set by the RichTextValue object.

@Snarp
Snarp / google-docs-copy.js
Last active April 9, 2025 16:16
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@IanColdwater
IanColdwater / twittermute.txt
Last active March 18, 2025 17:59
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@JulienDev
JulienDev / instagram_count_to_googe_sheet.js
Last active March 21, 2023 17:25
Track your Instagram followers over time with Google Sheets Scripts
// Your sheet name in the document
var sheetName = "Data";
// Your instagram user id
var user_id = "CHANGE-ME"; //find your id here : https://codeofaninja.com/tools/find-instagram-user-id
var instagram_base_url = "https://www.instagram.com/graphql/query/";
var following = "?query_hash=58712303d941c6855d4e888c5f0cd22f&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A24%7D"
var followers = "?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A24%7D"
var medias = "?query_hash=f2405b236d85e8296cf30347c9f08c2a&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A12%7D"
@sebasoffia
sebasoffia / instagram_count_to_googe_sheet.js
Created November 26, 2018 00:30 — forked from nickboyce/instagram_count_to_googe_sheet.js
Track your Instagram followers over time with Google Sheets Scripts
// the name of the sheet within your document
var sheetName = "Sheet1";
// the name of the Instagram account you want to track
var instagramAccountName = "kingandmcgaw";
function insertFollowerCount() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(this.sheetName);
accountdata = getInstagramData(this.instagramAccountName);
sheet.appendRow([Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd"), accountdata.followerCount]);
@nickboyce
nickboyce / instagram_count_to_googe_sheet.js
Last active June 23, 2024 22:01
Track your Instagram followers over time with Google Sheets Scripts
// Thank you to @juliendev for his script (updated here with minor cosmetic changes)
// https://gist.github.com/JulienDev/df5a3b66e899c224fa1b2dc90acfa2ae
// Your sheet name in the document
var sheetName = "Sheet1";
// Your instagram user id
var user_id = ""; //find your id here : https://codeofaninja.com/tools/find-instagram-user-id
var instagram_base_url = "https://www.instagram.com/graphql/query/";
var following = "?query_hash=58712303d941c6855d4e888c5f0cd22f&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A24%7D"
@alana-mullen
alana-mullen / Detect the last post in the WordPress loop
Last active May 29, 2023 16:50
Detect the last post in the WordPress loop
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) {
echo 'This is the last post';
} ?>
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) {
echo 'This is the not the last post';
} ?>
@bruth
bruth / shipitjournal.md
Last active October 16, 2021 19:43
Markdown version of Seth Godin's ShipIt Journal. Fork it. Complete it. Ship it.

Markdown version of Seth Godin's ShipIt Journal

Project:

Ship Date:

You may have already figured out these reasons for not shipping:

  • You might not know enough...
  • You might not see clearly enough...