Skip to content

Instantly share code, notes, and snippets.

View bhuone-garbu's full-sized avatar
:octocat:
Focusing

Bhuwan Garbuja bhuone-garbu

:octocat:
Focusing
  • United Kingdom
View GitHub Profile
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@bhuone-garbu
bhuone-garbu / IRR.js
Created January 7, 2021 10:32 — forked from ghalimi/IRR.js
IRR Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
// Some algorithms have been ported from Apache OpenOffice:
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@bhuone-garbu
bhuone-garbu / Auto sign commits.md
Last active May 8, 2020 12:06
Git signing settings with gnupg on Mac OS

Adding a new pgp keys with pgg-agent

  1. brew install gnupg pinentry-mac (this includes gpg-agent and pinentry)
  2. Generate a key: gpg --full-generate-key
  3. Use at least 4096 bits for RSA keys.
  4. Tell gpg-agent to use pinentry-mac:
vim ~/.gnupg/gpg-agent.conf 
<scheme name="Default" version="142" parent_scheme="Default">
<metaInfo>
<property name="created">2018-06-19T15:12:17</property>
<property name="ide">Idea</property>
<property name="ideVersion">2017.3.5.0.0</property>
<property name="modified">2018-06-19T15:13:15</property>
<property name="originalScheme">_@user_Default</property>
</metaInfo>
<attributes>
<option name="APEX_CONSTRUCTOR_DECLARATION">
@bhuone-garbu
bhuone-garbu / README.md
Last active August 21, 2017 14:31
Linux ODBC configuration with FreeTDS

How to talk to MS SQL server from Linux using freetds driver. See the appropriate .conf files for configuration

To test the tsql freetds driver and conf using tsql:

~$ tsql -S mssql2 -U '<username>' -P '<password>'
locale is "en_GB.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>
@bhuone-garbu
bhuone-garbu / logstash-debian
Created July 6, 2017 08:38
logstash init.d script for debian
#!/usr/bin/env sh
### BEGIN INIT INFO
# Provides: logstash
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.