Last active
March 5, 2019 17:29
Revisions
-
kstseng revised this gist
Mar 5, 2019 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ ## ## R sample code for loading credential ## library(configr) config = read.config(file = '~/.config/credential') -
kstseng revised this gist
Mar 5, 2019 . 1 changed file with 17 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,20 @@ library(configr) config = read.config(file = '~/.config/credential') ## section_a username_a = config$section_a$username password_a = config$section_a$password ## section_b username_b = config$section_b$username password_b = config$section_b$password print(sprintf('username_a: %s', username_a)) print(sprintf('password_a: %s', password_a)) print(sprintf('username_b: %s', username_b)) print(sprintf('password_b: %s', password_b)) ## username_a: abc ## password_a: 123 ## username_b: def ## password_b: 456 -
kstseng created this gist
Mar 5, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ library(configr) config = read.config(file = '/Users/kaishentseng/.config/company/credential') print(sprintf('username_a: %s', config$section_a$username)) print(sprintf('password_a: %s', config$section_a$password)) print(sprintf('username_b: %s', config$section_b$username)) print(sprintf('password_b: %s', config$section_b$password))