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 / convertSheet2Json.gs
Created November 28, 2016 13:40 — forked from daichan4649/convertSheet2Json.gs
spreadsheet のデータを JSON として読み込む(Google Apps Script)
function convertSheet2Json(sheet) {
// first line(title)
var colStartIndex = 1;
var rowNum = 1;
var firstRange = sheet.getRange(1, 1, 1, sheet.getLastColumn());
var firstRowValues = firstRange.getValues();
var titleColumns = firstRowValues[0];
// after the second line(data)
var lastRow = sheet.getLastRow();
@nk-gears
nk-gears / index-spec.js
Created November 19, 2016 08:45 — forked from abruzzi/index-spec.js
E2E test in AngularJS by using protractor
describe("index page", function() {
beforeEach(function() {
browser.get("http://localhost:9999/app/index.html");
});
it("should have navigator", function() {
expect(element("#navigator")).toBeDefined();
});
it("should have input box", function() {
@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 / learn-dynamodb.md
Created November 1, 2016 11:12 — forked from teohm/learn-dynamodb.md
personal reading notes about DynamoDB tips & gotcahs

Disclaimer: I'm super new to DynamoDB, so if you found I wrote something incorrect or stupid, just kindly send me a comment :)


Learn DynamoDB

  • database -> tables -> items -> attributes
  • db = a collection of tables
@nk-gears
nk-gears / gist:67949dce98e4fd0f111a6797c97a1f10
Created August 29, 2016 09:59 — forked from ishikawa/gist:88599
Java Sample Code for Calculating HMAC-SHA1 Signatures
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
/**