Skip to content

Instantly share code, notes, and snippets.

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

Nirmal nk-gears

💥
experimenting...
View GitHub Profile
@nk-gears
nk-gears / appsScript_ListFilesFolders_Mesgarpour.js
Created November 16, 2016 16:35 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/**
* Google Apps Script - List all files & folders in a Google Drive folder, & write into a speadsheet.
* - Main function 1: List all folders
* - Main function 2: List all files & folders
*
* Hint: Set your folder ID first! You may copy the folder ID from the browser's address field.
* The folder ID is everything after the 'folders/' portion of the URL.
*
* @version 1.0
* @see https://github.com/mesgarpour
@nk-gears
nk-gears / applib.gs
Last active October 27, 2023 07:42
Organizing Code in Apps Script #appscript
/* */
@nk-gears
nk-gears / ssh_config
Created December 3, 2016 14:28 — forked from MatthieuLemoine/ssh_config
SSH config proxy host
# ~/.ssh/config
Host <custom-name>
HostName <remote-host>
User <remote-user>
Port <remote-ssh-port>
ForwardAgent yes
ProxyCommand ssh -o 'ForwardAgent yes' <proxy-user>@<proxy-host> 'ssh-add && nc %h %p'
@nk-gears
nk-gears / tuya-nodejs-lib.js
Created July 25, 2022 03:27
Connect to Tuya Cloud - NodeJS
const CryptoJS = require('crypto-js');
const axios = require('axios');
class TuyaAPIClient {
constructor(options) {
this.options = options;
this.options.baseURL = 'https://openapi.tuyaus.com/v1.0';
this.options.access_token="";
}
#!/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:
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@nk-gears
nk-gears / devops.md
Created January 11, 2021 06:51
gcp devops review