Skip to content

Instantly share code, notes, and snippets.

@pavelmaca
pavelmaca / block_map.md
Last active May 11, 2024 11:09
Pylontech Force H2 - Solarman Modbus RTU registry map
Start End Block description
3972 3972 Unknown
4096 4111 Brand and model name
4112 4239 Empty
4320 4320 Date and time
4352 4415 Same as 5120-5183
4416 4607 Empty
4608 4671 Unknown, maybe settings (seems static)
4672 4863 Empty
/**
* HOW-TO
*/
// same param as $.ajax(option); see http://api.jquery.com/jQuery.ajax/
$.ajaxQueue.addRequest(option);
// start processing one by one requests
$.ajaxQueue.run();

Keybase proof

I hereby claim:

  • I am pavelmaca on github.
  • I am assassik (https://keybase.io/assassik) on keybase.
  • I have a public key whose fingerprint is F002 F747 AD89 28B8 7482 066C 8C94 702D 7729 D0C2

To claim this, I am signing this object:

<?php
public static function scanDir($patch, $pattern = false, $ignore = false){
$dir = new RecursiveDirectoryIterator($patch);
if( !$dir->isDir() ) throw new FileModelException("$patch must by directory");
$files= array();
foreach ($dir as $filename => $cur) {
if($ignore && in_array($file, $ignore)) continue;
@pavelmaca
pavelmaca / OS1_cv1.md
Last active April 18, 2016 07:10
Operační systémy - zápis ze cvičení

Příkaz man

  • příkaz / v man page umožní vyhledávat
  • příkazy n a p posun na další nalezený řetězec

shell

user@pcname:~$

  • $ => běžnýuživatel
  • # => root

Příkazy - apropos - hledání příkazů

/**
* Preview only
*/
{
// Global switch for mod - true/false
"enabled": true,
// Enable or disable mod in battle by hotkey
// You can combinate max. two keys by setting "key1+key2" (need to hold both keys at same time)
"hotkeySwitch": "CTRL+C",
public class Kresleni {
public static int VLEVO = 0;
public static int DOLU = 1;
public static int VPRAVO = 2;
public static int NAHORU = 3;
public static void main(String[] arg){
kresleni(10);
}
public static void kresleni(int velikost) {
@pavelmaca
pavelmaca / vazeni_1.js
Created October 22, 2015 20:55
Úkol na algoritmy
function tezsi(a, b){
return a > b ? a : b;
}
function porovnej(varianta){
console.log("Varianta: "+varianta.join());
var A = varianta[0];
var B = varianta[1];
var C = varianta[2];
var D = varianta[3];
<?php
class XYZ{
public function foo(){
wc();
}
}