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
  • 11:53 (UTC +02:00)
View GitHub Profile
@Kareszrk
Kareszrk / main.yml
Created February 3, 2024 12:42
github actions worker openssh
name: Deploy
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@Kareszrk
Kareszrk / responsive_table.html
Created January 17, 2024 10:48
Responsive table
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<style type="text/css">
table {
border: 1px solid #ccc;
border-collapse: collapse;
margin: 0;
@Kareszrk
Kareszrk / url_parameter_to_highlight_content_on_website.xt
Created January 10, 2024 18:44
URL parameter that gives the command to the browser to search for a specific string on the website and highlight it
#:~:text=sample text
If you put this after the end of the url, the browser will search for this "sample text" text and it will highlight that
example:
https://example.com/#:~:text=example
@Kareszrk
Kareszrk / serwice-worker.js
Created December 7, 2023 10:55 — forked from hawlik/serwice-worker.js
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({
@Kareszrk
Kareszrk / variousCountryListFormats.js
Created October 5, 2023 13:39 — forked from incredimike/variousCountryListFormats.js
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//