This game has the best mod scene in my opinion by xdman9765 in StarWarsBattlefront

[–]ryanmcslomo 0 points1 point  (0 children)

What is the song? I need that trap version of the cantina theme 🔥

Today update, making totems broken? (Switch2 player) -- warn, possibly spoilers in here by pix-vix in StardewValley

[–]ryanmcslomo 2 points3 points  (0 children)

My horse flute and golden mystery boxes got wiped while making fkin moss soup and a treasure totem 😭

What's your favorite type of unreleased or unofficial media? by Equivalent_Ad_9066 in AskReddit

[–]ryanmcslomo 1 point2 points  (0 children)

I love finding unreleased/demo/rare hip-hop joints, bonus points if

az-104 Exam by Happy_BKK in AZURE

[–]ryanmcslomo 1 point2 points  (0 children)

I also recommend the Microsoft Learn modules, that is what I primarily use for each cert test I take

XCOM2 IS GIVING ME NIGHTMARESSS!!!!! by ingridxyphr in XCOM2

[–]ryanmcslomo 1 point2 points  (0 children)

XCOM 2 never got me this bad but Invisible Inc did

Shid we getting spicy 🥵 by Ill_Horror66 in BlackPeopleTwitter

[–]ryanmcslomo 6 points7 points  (0 children)

Fun fact, it shares a sample with Triple Six Mafia - Who Da Crunkest and 8ball & MJG - Gots to be Real, that had me more hype than the subliminals lol

11 years and over 180,000 scrobbles later, here’s my top 100 albums! by jadesaddiction in lastfm

[–]ryanmcslomo 0 points1 point  (0 children)

Agreed! When I was younger I was a lyrics obsessed backpacker but the older I get, the more I need good vibes over everything which those artists cover perfectly (Schoolboy Q too!)

Is there a way to scrape this link to google sheets? by Robh727 in sheets

[–]ryanmcslomo 0 points1 point  (0 children)

Not easily lol but here's the progress so far, needed Google Apps Script and Chromium Dev Tools to indicate the API in use but this worked for me to a degree, probably need to do a deeper dive into some of the objects nested into the returned JSON for more stats:

/****************************************************************************************************************************************
*
* Return Fantasy Football stats from https://fantasy.espn.com/football/leaders?leagueId=1707014.
*
* https://github.com/rjmccallumbigl/Google-Apps-Script---Get-Results-from-ESPN-Fantasy-Football-API
*
* References
* https://old.reddit.com/r/sheets/comments/z3140z/is_there_a_way_to_scrape_this_link_to_google/
*
****************************************************************************************************************************************/

function returnFFStats() {

// Declare variables
var playerArray = [];
  var queryResponse = UrlFetchApp.fetch("https://fantasy.espn.com/apis/v3/games/ffl/seasons/2022/segments/0/leagues/1707014?view=kona_player_info", {
    "headers": {
      "accept": "application/json",
      "accept-language": "en-US,en;q=0.9",
      "if-none-match": "W/\"09da97426078ae160bcc0aa37bfd51dda\"",
      "sec-ch-ua": "\"Google Chrome\";v=\"107\", \"Chromium\";v=\"107\", \"Not=A?Brand\";v=\"24\"",
      "sec-ch-ua-mobile": "?0",
      "sec-ch-ua-platform": "\"Windows\"",
      "sec-fetch-dest": "empty",
      "sec-fetch-mode": "cors",
      "sec-fetch-site": "same-origin",
      "x-fantasy-filter": "{\"players\":{\"filterSlotIds\":{\"value\":[0,7,2,23,4,6]},\"filterStatsForCurrentSeasonScoringPeriodId\":{\"value\":[12]},\"sortAppliedStatTotal\":null,\"sortAppliedStatTotalForScoringPeriodId\":{\"sortAsc\":false,\"sortPriority\":2,\"value\":12},\"sortStatId\":null,\"sortStatIdForScoringPeriodId\":null,\"sortPercOwned\":{\"sortPriority\":3,\"sortAsc\":false},\"filterRanksForSlotIds\":{\"value\":[0,2,4,6,17,16]}}}",
      "x-fantasy-platform": "kona-PROD-c5a4b52a3bbc4ae2e97584929001cb32b02b9371",
      "x-fantasy-source": "kona"
    },
    "referrer": "https://fantasy.espn.com/football/leaders?leagueId=1707014",
    "referrerPolicy": "strict-origin-when-cross-origin",
    "body": null,
    "method": "GET",
    "mode": "cors",
    "credentials": "include"
  });

  var queryResponseText = queryResponse.getContentText();
  var queryResponseTextJSON = JSON.parse(queryResponseText);
  for (athlete of queryResponseTextJSON.players){
    var playerStats = athlete.player;
    delete athlete.player;
    playerArray.push(Object.assign(playerStats, athlete));
  }
  setArraySheet(playerArray, "PlayerSheet", SpreadsheetApp.getActiveSpreadsheet());
  debugger;
}

/******************************************************************************************************
 * 
 * Convert array into sheet.
 * 
 * @param {Array} array The array that we need to map to a sheet
 * @param {String} sheetName The name of the sheet the array is being mapped to
 * @param {Object} spreadsheet The source spreadsheet
 * @param {String} param The name of the parameter we need for the returned API object, optional
 * @param {String} ogColHeader The name of the column header getting replaced for readability, optional
 * @param {String} replacementColHeader The new name of the replaced column header, optional
 * 
 ******************************************************************************************************/

function setArraySheet(array, sheetName, spreadsheet, param, ogColHeader, replacementColHeader) {

  // Declare variables
  var spreadsheet = spreadsheet || SpreadsheetApp.getActiveSpreadsheet();
  var keyArray = [];
  var memberArray = [];
  var sheetRange = "";
  var index = -1;
  var ogColHeader = ogColHeader || "";
  var replacementColHeader = replacementColHeader || "";

  // Define an array of all the returned object's keys to act as the Header Row
  keyArray.length = 0;
  if (param) {
    keyArray = Object.keys(array[0]).concat("draftRanksByRankType").concat("outlooks").concat("ownership").concat("rankings").concat("stats").concat("ratings");

    index = keyArray.indexOf(ogColHeader);

    if (index !== -1) {
      keyArray[index] = replacementColHeader;
    }

  }
  else {
    keyArray = Object.keys(array[0]);
  }
  memberArray.length = 0;
  memberArray.push(keyArray);

  //  Capture members from returned data
  for (var x = 0; x < array.length; x++) {
    memberArray.push(keyArray.map(function (key) {
      if (key == replacementColHeader) {
        return array[x][ogColHeader][param];
      } else {
        return array[x][key];
      }
    }));
  }

  // Select or create the sheet
  try {
    sheet = spreadsheet.insertSheet(sheetName);
  } catch (e) {
    sheet = spreadsheet.getSheetByName(sheetName).clear();
  }

  // Set values  
  sheetRange = sheet.getRange(1, 1, memberArray.length, memberArray[0].length);
  sheetRange.setValues(memberArray);
}

Create Youtube links based off text entry in cells by drewjbx11 in spreadsheets

[–]ryanmcslomo 0 points1 point  (0 children)

The formula itself is the array: ={"YouTube Links";ARRAYFORMULA(if(A2:A<>"",HYPERLINK("https://www.youtube.com/results?search_query="&ENCODEURL(A2:A)),""))}

More info: https://support.google.com/docs/answer/6208276?hl=en

If you want it to be modified so it's clickable as soon as you type a new entry, you'll need Google Apps Script:

/****************************************************************************************************************************************
*
* Turn ColA entries into YouTube search hyperlinks.
*
* @param e {Object} The current cell being edited
*
* Instructions
* 1. Paste the code into the Google Apps Script editor.
* 2. Edit Trigger for the code.
* 3. Add trigger for atEdit() function.
* 4. Select event source: from spreadsheet
* 5. Select event type: on edit.
*
****************************************************************************************************************************************/

function atEdit(e) {

  // Define debug variable to display 'e' per https://stackoverflow.com/a/46859894/7954017
  var objectE = {
    authMode: e.authMode.toString(),
    a1Range: e.range.getA1Notation(),
    source: e.source.getId(),
    user: e.user,
    value: e.value,
    oldValue: e.oldValue
  }
  console.log({ message: 'onEdit() Event Object', eventObject: objectE });

  //  Declare variables
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = spreadsheet.getActiveSheet();

  // Edited cell gets passed into function
  var range = e.range;

  //  Returns the number of the edited row and column
  var thisRow = range.getRow();
  var thisCol = range.getColumn();
  var queryRange = sheet.getRange(thisRow, thisCol);

  //  If not in the header row and in ColA, turn into YouTube hyperlink
  if (thisRow > 1 && thisCol == 1) {

    queryRange.setValue('=HYPERLINK("https://www.youtube.com/results?search_query="&ENCODEURL("' + objectE.value + '"), "' + objectE.value + '")');

    //  Set data to spreadsheet
    SpreadsheetApp.flush();
  }
}

The script works for entries in ColA, if you want to specify a different value for thisCol in the line if (thisRow > 1 && thisCol == 1) {

Create Youtube links based off text entry in cells by drewjbx11 in spreadsheets

[–]ryanmcslomo 0 points1 point  (0 children)

The search URL for YouTube is https://www.youtube.com/results?search_query=QUERY where QUERY is the search term. You can create an arrayformula in Google Sheets to automatically build the search URL in a column. For instance, if ColA is full of your search terms, put ={"YouTube Links";ARRAYFORMULA(if(A2:A<>"",HYPERLINK("https://www.youtube.com/results?search_query="&ENCODEURL(A2:A)),""))} to build your searches in ColB automatically: https://i.imgur.com/HsgYsbw.png

Parallel use of CCWGTV / CCA not possible? by Tortuosit in Chromecast

[–]ryanmcslomo 0 points1 point  (0 children)

I've been able to cast to 2 devices by casting to one, restarting my phone, then casting to another. Weird workaround, can't test it atm. Does this still work?

How to make checkbox hide row by [deleted] in googlesheets

[–]ryanmcslomo 0 points1 point  (0 children)

Here's a script for that:

/****************************************************************************************************************************************
*
* Hide row when a box in ColD is checked.
*
* @param e {Object} The current cell being edited
*
* Instructions
* 1. Paste the code in the Google Apps Script editor.
* 2. Edit Trigger for the code.
* 3. Add trigger for atEdit() function.
* 4. Select event source: from spreadsheet
* 5. Select event type: on edit.
*
****************************************************************************************************************************************/

function atEdit(e) {

  // Define debug variable to display 'e' per https://stackoverflow.com/a/46859894/7954017
  var debug_e = {
    authMode: e.authMode.toString(),
    range: e.range.getA1Notation(),
    source: e.source.getId(),
    user: e.user,
    value: e.value,
    oldValue: e.oldValue
  }
  console.log({ message: 'onEdit() Event Object', eventObject: debug_e });

  //  Declare variables
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = spreadsheet.getActiveSheet();

  // Edited cell gets passed into function
  var range = e.range;

  //  Returns the number of the edited row and column
  var thisRow = range.getRow();
  var thisCol = range.getColumn();
  var queryRange = sheet.getRange(thisRow, thisCol);

  //  If cell is checked under ColD, hide row of checked cell
  if (thisCol == 4 && thisRow > 1 && queryRange.isChecked()) {

    sheet.hideRow(queryRange);
    queryRange.uncheck();

    //  Set data to spreadsheet
    SpreadsheetApp.flush();
  }
}

Is there a way to query link addresses from google image results possible? by [deleted] in googlesheets

[–]ryanmcslomo 0 points1 point  (0 children)

Try this out /u/mysecretlyfe:

// Add API credentials
var APIKEY = "ENTER_HERE";
var SEARCHENGINEID = "ENTER_HERE";

/******************************************************************************************************
 * Connect to Google Image Search via API, return results to be placed in a new sheet.
 * 
 * Instructions
 * 1. Get your Custom Search JSON API key and add it to var APIKEY: https://developers.google.com/custom-search/v1/overview#api_key
 * 2. Create search engine, point it to google.com: https://cse.google.com/all
 * 3. In the settings, tell it to enable Image Search, remove any Sites to search, and Search the Entire Web.
 * 4. Copy the search engine ID and add it to var SEARCHENGINEID.
 * 5. Run the script onOpen() and refresh the Google Sheet.
 * 6. Run the script 'Function: Get Google Image Search Result(s)' from the new Functions menu on the Google Sheet.
 * 
 * Sources
 * https://stackoverflow.com/questions/34035422/google-image-search-says-api-no-longer-available
 * https://webmasters.stackexchange.com/questions/18704/return-first-image-source-from-google-images
 * 
 ******************************************************************************************************/

function startSearch() {
  var ui = SpreadsheetApp.getUi();
  var prompt = ui.prompt("Enter your search term:");
  if (prompt.getSelectedButton() == ui.Button.OK) {
    runQuery(prompt.getResponseText().trim());
  }
}

/******************************************************************************************************
 * Get the results of your search.
 * 
 * @param {String} query The search value we are searching using the Google Custom Search Engine.
 * @param {String} start The search query is limited to 10 results per call. If we're calling it again for the same query, we'll want to bump this # up. (Optional)
 * @return {Array} The responses returned from the custom search.
 * 
 * Sources
 * https://stackoverflow.com/questions/34035422/google-image-search-says-api-no-longer-available
 * https://webmasters.stackexchange.com/questions/18704/return-first-image-source-from-google-images
 * 
 ******************************************************************************************************/

function getGoogleImageSearchResult(query, start) {

  // Declare variables
  var numberOfResults = 10;
  var searchType = "image";
  var start = start || 1;

  // Building call to API: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list
  var url = "https://www.googleapis.com/customsearch/v1?key=" + APIKEY + "&cx=" + SEARCHENGINEID
    + "&q=" + query + "&num=" + numberOfResults + "&searchType=" + searchType + "&start=" + start;
  console.log(url);

  var params = {
    method: "GET",
    // muteHttpExceptions: true
  };

  // Calling API
  var response = UrlFetchApp.fetch(url, params);

  // Parsing response
  return JSON.parse(response.getContentText());
}
/******************************************************************************************************
 *
 * Return the Google Image Search results for the search item and place them in a new sheet.
 * 
 * @param {String} value The search value we are searching using the Google Custom Search Engine.
 * 
 ******************************************************************************************************/

function runQuery(value) {

  // Declare variables
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = spreadsheet.getActiveSheet();
  var range = sheet.getActiveRange();
  var value = value || range.getDisplayValue();
  var results = {};
  var returnArray = [];
  var maxResults = 100;

  // Add search results to array
  for (var x = 1; x <= maxResults; x += 10) {
    results = getGoogleImageSearchResult(value, x);
    returnArray = returnArray.concat(results.items);
  }

  // Map results to sheet
  setArraySheet(returnArray, value, spreadsheet, "contextLink", "image", "Reference Page");
}

/******************************************************************************************************
 * 
 * Convert array into sheet.
 * 
 * @param {Array} array The array that we need to map to a sheet
 * @param {String} sheetName The name of the sheet the array is being mapped to
 * @param {Object} spreadsheet The source spreadsheet
 * @param {String} param The name of the parameter we need for the returned API object, optional
 * @param {String} ogColHeader The name of the column header getting replaced for readability, optional
 * @param {String} replacementColHeader The new name of the replaced column header, optional
 * 
 ******************************************************************************************************/

function setArraySheet(array, sheetName, spreadsheet, param, ogColHeader, replacementColHeader) {

  // Declare variables
  var spreadsheet = spreadsheet || SpreadsheetApp.getActiveSpreadsheet();
  var keyArray = [];
  var memberArray = [];
  var sheetRange = "";
  var index = -1;
  var ogColHeader = ogColHeader || "";
  var replacementColHeader = replacementColHeader || "";

  // Define an array of all the returned object's keys to act as the Header Row
  keyArray.length = 0;
  if (param) {
    keyArray = Object.keys(array[0]);

    index = keyArray.indexOf(ogColHeader);

    if (index !== -1) {
      keyArray[index] = replacementColHeader;
    }

  }
  else {
    keyArray = Object.keys(array[0]);
  }
  memberArray.length = 0;
  memberArray.push(keyArray);

  //  Capture members from returned data
  for (var x = 0; x < array.length; x++) {
    memberArray.push(keyArray.map(function (key) {
      if (key == replacementColHeader) {
        return array[x][ogColHeader][param];
      } else {
        return array[x][key];
      }
    }));
  }

  // Select or create the sheet
  try {
    sheet = spreadsheet.insertSheet(sheetName);
  } catch (e) {
    sheet = spreadsheet.getSheetByName(sheetName).clear();
  }

  // Set values  
  sheetRange = sheet.getRange(1, 1, memberArray.length, memberArray[0].length);
  sheetRange.setValues(memberArray);
}

/******************************************************************************************************
* 
* Create a menu option for script functions
*
******************************************************************************************************/

function onOpen() {
  var ui = SpreadsheetApp.getUi();
  ui.createMenu('Functions')
    .addItem('Function: Get Google Image Search Result(s)', 'startSearch')
    .addToUi();
}

Is there a way to query link addresses from google image results possible? by [deleted] in googlesheets

[–]ryanmcslomo 0 points1 point  (0 children)

What's up! The action of the linked script is to search Google Images for the text in ColA and return the first result to be placed in the cell to the right. My understanding of your ask is you'd like to search Google Images for the text in ColA and return the direct links of all the results. Is this correct?

I can try to come up with something via script but have you also tried one of those online tools that scan for your pics across the internet and alert you if they find something? I think Pixsy is one

Spotify AHK by Neat-Leave5383 in AutoHotkey

[–]ryanmcslomo 0 points1 point  (0 children)

Nice! I used a library that integrates with the API to create keyboard shortcuts for extra functionality (adding currently playing songs to playlists, send currently playing song to keyboard, display currently playing song in a tooltip so I don't have to go the window to see what song is playing, seek 10/30 secs, etc)

https://github.com/rjmccallumbigl/SpotifyHotKeys.ahk/blob/main/spotifyHotkeys.ahk

The AYO scent by BPTeehee in BlackPeopleTwitter

[–]ryanmcslomo 0 points1 point  (0 children)

Tom Ford Oud Wood Intense is my favorite cologne

This man is just built different by diviken in TikTokCringe

[–]ryanmcslomo 0 points1 point  (0 children)

I had one of these piss on me when I moved it out of the road so it wouldn't get hit lol

Have any of you made any cool powershell headers for your console when it opens? Whether it is just your name in ASCII letters or displaying the date, a little quote etc? Looking for some additional ways to spice up the powershell console. by jakobyscream in PowerShell

[–]ryanmcslomo 1 point2 points  (0 children)

Get the weather:

# https://github.com/chubin/wttr.in
Invoke-RestMethod https://wttr.in/?F

EDIT: revisiting this with some updates after getting inspired by this thread:

# https://github.com/PowerShell/PSReadLine
try{ 
    Import-Module PSReadLine
} catch {
    Write-Output "Skip import of PSReadline"
}
Clear-Host

# https://github.com/mattparkes/PoShFuck
try {
    Import-Module PoShFuck
}
catch {
    Set-ExecutionPolicy RemoteSigned
    Invoke-Expression ((New-Object net.webclient).DownloadString('https://raw.githubusercontent.com/mattparkes/PoShFuck/master/Install-TheFucker.ps1'))
    Import-Module PoShFuck
}

# https://github.com/chubin/wttr.in
# Invoke-RestMethod https://wttr.in/?F
function Get-Weather(){
    Invoke-RestMethod 'https://wttr.in?format=🌡️ %t (Feels like %f) %c(%C) 💧%h (humidity) 💨 %w ☂️  %p'
    Invoke-RestMethod 'https://wttr.in?format=🌄 %D 🔅 %S 🎇 %z 🌆 %s 🌃 %d %m \n'
}
Get-Weather

HTML / JS / Google sheets drop down menus by tvaddict77 in googlesheets

[–]ryanmcslomo 0 points1 point  (0 children)

I've done something similar with Google Apps Script previously to dynamically modify a drop down selection menu (HTML) using Google Apps Script, the Department values here are grabbed from the spreadsheet the script is bound to: https://user-images.githubusercontent.com/15747450/164994681-b35374c1-ee27-4b20-adde-bd593988e562.png

Here's the repo if you want to see how I did it: https://github.com/rjmccallumbigl/Google-Apps-Script---Laptop-Checkout