Skip to content

Instantly share code, notes, and snippets.

View Kareszrk's full-sized avatar
🏠
Working from home

Karesz Kareszrk

🏠
Working from home
  • Hungary, Budapest
  • 14:09 (UTC +02:00)
View GitHub Profile
@Kareszrk
Kareszrk / README.md
Created January 10, 2025 07:12
Add SSH key on windows 11

To add SSH keys for accessing your Ubuntu workstation from your Windows 11 machine, follow these steps:

  1. Generate an SSH key on Windows 11:
    • Open PowerShell or Command Prompt.
    • Run the following command to generate a new SSH key pair:
      ssh-keygen -t rsa -b 4096 -C "username@server_host"
    • Follow the prompts to save the key (default location is usually fine) and set a passphrase if desired.
@navjotdhanawat
navjotdhanawat / json-to-s3.js
Created July 3, 2018 07:17
Create json and upload to s3 bucket using nodejs.
var AWS = require('aws-sdk');
AWS.config.update({ region: 'us-east-1' });
var s3 = new AWS.S3();
var obj = {
firstname: "Navjot",
lastname: "Dhanawat"
};
var buf = Buffer.from(JSON.stringify(obj));
@hawlik
hawlik / serwice-worker.js
Created January 4, 2017 23:00
service worker redirect to browser tab on push notification click event
//browser push notification "onClick" event heandler
self.addEventListener('notificationclick', function(event) {
console.log('[Service Worker] Notification click Received.');
event.notification.close();
/**
* if exists open browser tab with matching url just set focus to it,
* otherwise open new tab/window with sw root scope url
*/
event.waitUntil(clients.matchAll({