Skip to content

Instantly share code, notes, and snippets.

View nk-gears's full-sized avatar
💥
experimenting...

Nirmal nk-gears

💥
experimenting...
View GitHub Profile
@tanaikech
tanaikech / sbmit.md
Created November 8, 2023 06:36
Uploading Files without Authorizing Scopes by Shared Users with Dialog on Google Spreadsheet using Google Apps Script

Uploading Files without Authorizing Scopes by Shared Users with Dialog on Google Spreadsheet using Google Apps Script

Abstract

One day, you might have a situation where you are required to make the shared users upload a file and text using a dialog or sidebar on Google Spreadsheet to your Google Drive and Spreadsheet without authorization by the users. This report introduces a solution for achieving this situation.

Introduction

Google Spreadsheet can run Javascript on a dialog and a sidebar. Ref These can be used as a strong tool for working on Spreadsheet. There might be a situation where you want to make the shared users input a value and upload a file without authorization of the scopes. In this report, I would like to introduce 2 patterns to achieve this goal.

@tanaikech
tanaikech / submit.md
Created August 17, 2023 05:45
Cooking PDF over Google Apps Script

Cooking PDF over Google Apps Script

Abstract

When PDF file can be managed with Google Apps Script, that will lead to the automation process on cloud. In this report, the method for cooking PDF over Google Apps Script.

Introduction

@spyesx
spyesx / esm-package.md
Created November 21, 2021 10:13 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@CharlesGodwin
CharlesGodwin / cloudflare.md
Last active April 29, 2024 12:49
I Don't Need Port Forwarding and Don't Care About CGNAT

I Don't Need Port Forwarding and Don't Care About CGNAT

This was rewritten 2022-11-30

This article is for users that want all these features:

  • To connect to home network from anywhere
  • Can connect without any port forwarding; either by choice or internet provider can't or won't provide access
  • No setup or configuration or installation on client machine
  • No enrolment / registration required
#!/usr/bin/env bash
# Taken from (and freely modified as no license was specified):
# https://gist.github.com/ecompayment/b1054421eb90f296bbca226683c7ff7e
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
# Before running this script, you must:
# - Disable FileVault (if it is enabled) Note: You will not be able to re-enable FileVault AND keep these customisations.
# - Reboot your Mac into Recovery Mode.
# - Select Terminal from top menu and run the following commands:
@henhan
henhan / nginx_documentation.md
Last active April 15, 2024 02:31
Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Documentation on how to override or extend the default nginx config on Elastic Beanstalk running om Amazon Linux 2. Correct as of 2021-08-01. Also see the general documentation on how to extend linux servers.

All references to placing files refer to putting a file at this location in your application bundle. You should never modify a file directly at your Elastic Beanstalk server by ssh:ing to the server, since such a change will be wiped whenever your servers autoscale or if you rebuild your application completely.

Adding a new location block

The easiest extension is to add a new location block to the main server block. This can be done by placing a .conf file with a server block in the folder .platform/nginx/conf.d/elasticbeanstalk. Any such file is automatically included in the main server block.

Overriding the default location

@oshliaer
oshliaer / .readme.md
Last active October 9, 2023 06:39 — forked from pilbot/ChunkyCache.gs
Using the Google Apps Script Cache Service for objects above 100Kb
'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
const domainHash = headers['x-domain-hash'] && headers['x-domain-hash'][0].value;
if (domainHash) {
request.uri = '/' + domainHash + request.uri;
}
return callback(null, request);
@bbqchickenrobot
bbqchickenrobot / ApplicantList.razor
Last active October 17, 2022 08:32
Blazorise DataGrid Example
@using Workflows.Models.FairChance
@inject NavigationManager NavigationManager
<br />
<br />
<Button Color="Color.Info" Clicked="OpenModal" class="float-right" style="background-color:mediumseagreen">
+Assessment
</Button>
<br />
<br />
@tjluoma
tjluoma / backupmas.sh
Created November 25, 2020 17:17
backup all of your Mac App Store apps
#!/usr/bin/env zsh -f
# Purpose: Create a backup of all Mac App Store apps
# NTS: like 'backup-mas-apps.sh' but without growlnotify
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2019-06-01
# point this to wherever you want backups to be made.
# it will be created if it does not exist