Skip to content

Instantly share code, notes, and snippets.

@niraj8
niraj8 / change-git-repos-to-use-ssh.md
Last active May 24, 2022 12:24
Update .git/config files for local repos to use SSH

If you have SSH keys added to your GitHub account you can switch your repos to use SSH

  1. Disable credential.helper
  • Check if credential.helper is set to anything git config -l --global
  • Unset credential.helper with git config --global --unset credential.helper
  1. Verify URLs are as expected. Then add a -i to sed to update in place(in the .git/config file)
@niraj8
niraj8 / lambda-events-logger.js
Created April 13, 2022 09:18
Log events & count of records received
exports.handler = async (event, context) => {
event.Records.forEach(record => {
console.log(record.body);
});
console.log('## EVENT: ' + serialize(event));
console.log('## Number of Records: ' + event.Records.length);
return true;
};
This file has been truncated, but you can view the full file.
[18/Sep/2016:07:14:45 -0500] "GET /blog.rss HTTP/1.1" 200 398519 4.100 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1" "-"
[18/Sep/2016:07:14:47 -0500] "GET /blog.rss HTTP/1.1" 304 0 0.000 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36" "-"
[18/Sep/2016:07:14:56 -0500] "GET /blog.rss HTTP/1.1" 200 399362 0.300 "-" "Feedly/1.0 (+http://www.feedly.com/fetcher.html; like FeedFetcher-Google)" "-"
[18/Sep/2016:07:15:03 -0500] "GET /blog.rss HTTP/1.1" 304 0 0.000 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36" "-"
[18/Sep/2016:07:15:04 -0500] "GET /blog.rss HTTP/1.1" 304 0 0.000 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36" "-"
[18/Sep/2016:07:15:08 -0500] "GET /blog.rss HTTP/1.1" 200 396971 1.600 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKi
@niraj8
niraj8 / SE.md
Last active March 13, 2024 07:07