#!/bin/bash
HostName=
PortListen=
PortTarget=
IPv4=$(ping -c1 $HostName | grep "bytes of data" | cut -d "(" -f2 | cut -d ")" -f1)
echo $IPv4
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 characters
'use strict'; | |
// ==UserScript== | |
// @name Weblate Simple Change Highlighter | |
// @description On Weblate, while checking a translation, highlight the editbox if you make any changes. | |
// @version 0.2 | |
// @license MIT | |
// @author Yılmaz Durmaz | |
// @namespace https://gist.github.com/yilmazdurmaz | |
// @match https://hosted.weblate.org/translate/*/*/*/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=weblate.org |
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 characters
#JS-Modules-in-HTML-and-Nodejs |
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 characters
D [0-9] | |
L [a-zA-Z_] | |
H [a-fA-F0-9] | |
E ([Ee][+-]?{D}+) | |
P ([Pp][+-]?{D}+) | |
FS (f|F|l|L) | |
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U)) | |
%{ | |
#include <stdio.h> |
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 characters
// ==UserScript== | |
// @name BlockAdblock Blocker | |
// @version 1.0 | |
// @namespace http://tampermonkey.net/ | |
// @description Blocks block-adblock | |
// @match *://**/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
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 characters
let fields= [ "id", "name" ] | |
let data=[ | |
[ 1, 'ali' ], | |
[ 2, 'veli' ], | |
[ 3, 'deli' ] | |
] | |
let res=[] |
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 characters
:: postgresql is extracted into "d:\pgsql\" and data is init at "d:\pgsql\pgdata" | |
:: d:\pgsql\bin\initdb -D d:\pgsql\pgdata -U postgres -W -E UTF8 -A scram-sha-256 | |
:: find postres instances running on our data folder | |
wmic.exe path Win32_Process where name="postgres.exe" get Commandline /format:list | find "d:/pgsql/pgdata" > null | |
:: stop is already running, and start if not | |
if errorlevel 1 (d:\pgsql\bin\pg_ctl -D d:\pgsql\pgdata -l logfile start) else (d:\pgsql\bin\pg_ctl -D d:\pgsql\pgdata -l logfile stop) |
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 characters
let a=[10,20,30,40] | |
let getit=async(ax,ix,arr)=>{ | |
//console.log(ax,ix,arr) | |
let time=Math.random()*3000; | |
let ret=Math.random()>0.3; | |
console.log(ix,arr[ix],time,ret); | |
return new Promise((res,rej)=>{ | |
setTimeout(()=>{ | |
if (ret) { |
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 characters
#!/usr/bin/env python3 | |
import http.server | |
import socketserver | |
PORT = 8000 | |
Handler = http.server.SimpleHTTPRequestHandler | |
Handler.extensions_map.update({ | |
'.wasm': 'application/wasm', |
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 characters
// open history page of the browser | |
// open dev tools and get to console | |
// set sleep function and the use for loop | |
// change "getelements..." queries if needed | |
// note that it is not intended to clear thing other than history | |
// sleep function from https://stackoverflow.com/a/951057/9512475 | |
// sleep time expects milliseconds | |
function sleep (time) { | |
return new Promise((resolve) => setTimeout(resolve, time)); |
NewerOlder