This file contains 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 characters
# To expose cockpit control panel over SSL, add | |
Origins = https://cp.dev.mydomain.com wss://cp.dev.mydomain.com |
This file contains 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 characters
#!/bin/sh | |
export NODE_OPTIONS=--use-openssl-ca | |
tmux="tmux -L damp" | |
$tmux attach | |
if [ $? -ne 0 ]; then | |
$tmux new-session -d | |
$tmux send-keys 'cd ./backend/' Enter |
This file contains 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 characters
address=/.dev.ssrvm.org/3.110.207.103 |
This file contains 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 characters
// Source: https://itnext.io/handling-data-with-web-components-9e7e4a452e6e | |
class EventBus { | |
constructor() { | |
this._bus = document.createElement('div'); | |
} | |
register(event, callback) { | |
this._bus.addEventListener(event, callback); | |
} |
This file contains 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 characters
<?php | |
// A map of "request_path" => Array of target urls. | |
// Any request coming to "request_path" will be forwarded/relayed to all the urls specified in its value | |
// fowarding is done asynchronously and concurrntly. | |
$conf = [ | |
'/mywebook1' => [ | |
'https://testing.myapp.local/webhook/webhook1', | |
'https://dev.myapp.local/webhook/webhook1', | |
], |
This file contains 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 characters
INSERT INTO my_table (col_a, col_b) | |
(SELECT col_a, | |
col_b | |
FROM json_populate_recordset(NULL::my_table, ?) | |
) | |
-- Here query parameter should be a json collection ( array of objects ) which matches with column names of my_table |
This file contains 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 characters
function log(...args) { | |
console.log(new Date(), ...args); | |
} | |
// Compute intensive synchronous task | |
function doMatrixMult(n) { | |
let out = 1; | |
for (let index = 0; index < n; index++) { | |
out = out + Math.sin(index); | |
} |
This file contains 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 characters
<?php | |
/* | |
* ॐ Om Brahmarppanam ॐ | |
* | |
* schema/migrator.php | |
* Created at: Thu Jul 20 2022 19:34:40 GMT+0530 (GMT+05:30) | |
* | |
* Copyright 2022 Harish Karumuthil <[email protected]> | |
* | |
* Use of this source code is governed by an MIT-style |
This file contains 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 characters
location /dba/ { | |
auth_request /auth/check_login/; | |
error_page 403 /auth/login/; | |
# Server running dba tool | |
proxy_pass http://127.0.0.1:7777/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
auth_request_set $auth_db_vendor $upstream_http_db_vendor; |
This file contains 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 characters
#!/bin/bash | |
# Usage: | |
# zypper-print-urls.sh pkg1 pk2 pkg3 ... | |
# This script actualy create a solver state and | |
# then derives urls from the sovler state. | |
solverDir=$(zypper install --debug-solver $@ | grep 'successfully at' | sed 's#Solver test case generated successfully at \(.*\).#\1#' ) |
NewerOlder