Skip to content

Instantly share code, notes, and snippets.

@gstru
gstru / calendarSync.js
Last active September 10, 2021 09:42
Script to add events on google calendar using a google spreadsheet
function calendarsync() {
var spreadsheet = SpreadsheetApp.getActiveSheet();
var calendarId = spreadsheet.getRange("C3").getValue();
var eventCal = CalendarApp.getCalendarById(calendarId);
var signups = spreadsheet.getRange("A38:D51").getValues();
for (x = 0; x < signups.length; x++) {
var shift = signups[x];
var nameEvent = shift[0]
var startEvent = shift[1];
var endEvent = shift[2];
@gstru
gstru / auto_scroll_news.py
Last active September 10, 2021 09:50
Script to read news without scrolling
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import requests
import time
from urllib.parse import unquote, urlparse
import datetime
import openpyxl
filename = 'path/data.xlsm'
wb = openpyxl.load_workbook(filename)
@gstru
gstru / auto_install.ps1
Last active February 26, 2023 12:37
Script to automatically install programs with chocolatey
# Check if Chocolatey is installed, if not, install it
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
Set-ExecutionPolicy Bypass -Scope Process -Force;
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
# Install the required packages
$packages = @("googlechrome", "vlc", "7zip", "vcredist140", "adobereader", "everything", "choco-cleaner")
foreach ($package in $packages) {
choco install $package -y