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
from bases.FrameworkServices.LogService import LogService | |
import os | |
ORDER = ['dns_query'] | |
CHARTS = { | |
"dns_query": { | |
'options': [None, 'DNS Queries', 'responses/s', 'responses', 'dnsmasq_log.dns_query', 'line'], | |
'lines': [ | |
['successful_query', 'success', 'absolute'], | |
['query_errors', 'error', 'absolute'], |
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
#!/usr/bin/python | |
from bases.FrameworkServices.SimpleService import SimpleService | |
import os | |
import json | |
import ipaddress | |
import random | |
import subprocess | |
import re | |
FPING_REGEX = r"(\S*)\s+: ([\d.]+|-)" |
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
MIT License | |
Copyright (c) 2019 Krzysztof "RouNdeL" Zdulski | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
// ==UserScript== | |
// @name Better Random Number | |
// @version 1.3 | |
// @description Interpolated roll for Google's random number generator | |
// @author RouNdeL | |
// @match https://www.google.pl/search* | |
// @match https://www.google.com/search* | |
// @require http://code.jquery.com/jquery-3.3.1.min.js | |
// @resource customCSS https://home.zdul.xyz/material_select.css?v=1 | |
// @grant GM_addStyle |
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 | |
# Copyright 2019 Krzysztof "RouNdeL" Zdulski | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
# and associated documentation files (the "Software"), to deal in the Software without restriction, | |
# including without limitation the rights to use, copy, modify, merge, publish, distribute, | |
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
def diamond(n): | |
half = n/2 | |
print(half * " " + "*") | |
r = range(1, half + n % 2)+range(half-1, 0, -1) | |
for i in r: | |
print((half - i) * " " + "*" + (2*i-1) * " " + "*") | |
print(half * " " + "*") |
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
const users = []; | |
const li = $("div[data-testid='info_panel']").find("h4:contains('People')").eq(0).siblings().eq(1).find("li").each(function(){ | |
const text = $(this).text(); | |
users.push(text.replace(/^(Admin|Administrator)/, "")); | |
}); | |
console.log(users.join("\n")); |
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
{ | |
"142": { | |
"name": "Asia", | |
"sub": { | |
"143": { | |
"name": "Central Asia", | |
"countries": [ | |
"TM", | |
"TJ", | |
"KG", |
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
/* | |
* MIT License | |
* | |
* Copyright (c) 2019 Krzysztof "RouNdeL" Zdulski | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
/** | |
* Generate a BLE compliant org.bluetooth.characteristic.current_time characteristic value | |
* | |
* @param {Date} date | |
* @param {Number} reason | |
*/ | |
function getBleTime(date, reason = 1) { | |
let str = ""; | |
str += date.getFullYear().toString(16).padStart(4, "0").match(/[a-fA-F0-9]{2}/g).reverse().join(''); |
OlderNewer