Skip to content

Instantly share code, notes, and snippets.

@krists
krists / Turn CAPSLOCK to Ctrl.reg
Last active February 3, 2024 21:23
Remap Caps-Lock key to Ctrl in Windows 7/8
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active June 25, 2024 12:19
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@tanaikech
tanaikech / submit.md
Last active May 21, 2024 11:16
Multipart-POST Request Using Google Apps Script

Multipart-POST Request Using Google Apps Script

April 20, 2019: GAS library for this situation was published. Please check it at https://github.com/tanaikech/FetchApp.

These sample scripts are for requesting multipart post using Google Apps Script.

In most cases, the multipart request is used for uploading files. So I prepared 2 sample situations as follows. For each situation, the request parameters are different.

  1. Upload a file from Google Drive to Slack.
  2. Convert an excel file to Spreadsheet on Google Drive using Drive API v3.
@CodingDoug
CodingDoug / README.md
Last active December 17, 2022 10:23
Copying data from Firebase Realtime Database to a Google Sheet in real time via Cloud Functions
@erajanraja24
erajanraja24 / MongoDB Webhook function
Created December 13, 2019 18:02
MongoDB Webhook function
exports = async function(payload) {
const mongodb = context.services.get("mongodb-atlas");
const eventsdb = mongodb.db("googlesheetsdb");
const eventscoll = eventsdb.collection("employee_records");
const result= await eventscoll.insertOne(payload.query);
var id = result.insertedId.toString();
if(result) {
return JSON.stringify(id,false,false);
}
return { text: `Error saving` };
@sdesalas
sdesalas / Async.gs
Last active May 9, 2024 07:02
Asynchronous execution for Google App Scripts (gas)
/*
* Async.gs
*
* Manages asyncronous execution via time-based triggers.
*
* Note that execution normally takes 30-60s due to scheduling of the trigger.
*
* @see https://developers.google.com/apps-script/reference/script/clock-trigger-builder.html
*/
#!/bin/bash
############################################################################
# This script simply formats a block device and mounts it to the data
# directory in a very safe manner by checking that the block device is
# completely empty
#
############################################################################
set -eu
if [ $# -ne 2 ]
@ppoffice
ppoffice / README.md
Last active June 26, 2024 01:51
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@MayankFawkes
MayankFawkes / sources.list
Created August 6, 2020 03:13
Ubuntu 20.04 LTS (ARM64) (Focal Fossa) -- Full sources.list
deb http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse
@martinsam16
martinsam16 / docker-wsl2.md
Last active June 24, 2024 20:36
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu