Skip to content

Instantly share code, notes, and snippets.

View RR-Helpdesk's full-sized avatar
💭

Helpdesk RR-Helpdesk

💭
View GitHub Profile
@RR-Helpdesk
RR-Helpdesk / Postgres
Last active October 13, 2023 07:46
Postgres Snippets
DROP TABLE "public"."varCalcValue";
CREATE TABLE "public"."varCalcValue" (
"id" bigint NOT NULL GENERATED ALWAYS AS IDENTITY,
"varCalcValue" VARCHAR(50) NOT NULL,
"createdOn" TIMESTAMP NULL,
"updatedOn" TIMESTAMP NULL
);
@RR-Helpdesk
RR-Helpdesk / create_dir_folders.gs
Created July 18, 2023 09:25
Create Directory of Folders #gas #GAS #GoogleAppScript #Google
/*
Some Global Variables to make it easier to keep a track of changing column
positions, etc.
*/
// 'Folder Name' column number
var folderNameCol = 1;
// 'Folder Link' column number
var folderLinkCol = 2;
@RR-Helpdesk
RR-Helpdesk / Get Background HEX Color Function
Last active June 10, 2023 15:31
Google Sheets Custom Functions #sheets #gas #functions
/**
* Returns the Hexadecimal value of a cell's background color.
*
* @param {number} row The cell's row number.
* @param {number} column The cell's column number.
* @return The Hexadecimal value of the cell's background color.
* @customfunction
*/
function BGHEX(row, column) {
var background = SpreadsheetApp.getActive().getDataRange().getCell(row, column).getBackground();
regexp_replace('revenue'), '[$K,1]', '') * 100
@RR-Helpdesk
RR-Helpdesk / Dynamic Copywrite Year
Last active June 10, 2023 12:12
Webflow #webflow
Add this code as an HTML embed in your footer:
<div class="paragraph">&copy; Company Name <script>document.write(new Date().getFullYear())</script>. All Rights Reserved.</div>
@RR-Helpdesk
RR-Helpdesk / Postgres Auth Commands
Last active June 10, 2023 12:14
Postgres SQL Statements #postgres
SHOW password_encryption;
SELECT rolpassword from pg_authid where rolname = '{your-db-user-name}';
ALTER USER "{your-db-user-name}" with password '{your-new-db-password}';
SET password_encryption = 'scram-sha-256';
SET password_encryption = 'md6';
SHOW password_encryption;
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@RR-Helpdesk
RR-Helpdesk / Filter Formla Examples
Last active June 10, 2023 12:09
Helpful Google Sheets Formulas #Sheets #Google
https://blog.coupler.io/filter-function-google-sheets/
@RR-Helpdesk
RR-Helpdesk / Add Files to Multiple Folders with Code.gs
Last active April 4, 2023 04:42
Google Apps Scripts #GoogleAppScript #GAS
function organizeFolders() {
// Parent Folders
var parentA = DriveApp.createFolder('Dad');
var parentB = DriveApp.createFolder('Mom');
// Child folder inside Parent Folder A
var child = parentA.createFolder('Child');
// Place Child Folder inside another Parent Folder B
parentB.addFolder(child);
@RR-Helpdesk
RR-Helpdesk / Add URL for Specific Tabs
Last active October 2, 2022 14:58
Webflow CSS #webflow #css
<script>
$( function() {
function changeTab() {
var tabName = window.location.hash.substr(1);
var tabEl = $('[data-w-tab="' + tabName + '"]');
if (tabEl.length) {
tabEl.click();
}
}