Skip to content

Instantly share code, notes, and snippets.

@knedle
knedle / path of exile list of maps v 3.10
Last active March 28, 2020 19:53
source: tab from http://poedb.tw/us/area.php?cn=Map / but source is old / i remove and fix some maps
[
{
"Name": "Academy Map",
"Tier": [
4,
7,
11,
12,
14
],
@knedle
knedle / Automatická oprava indexů pomocí skriptu v SQL Server
Last active December 17, 2018 09:16
Automatická oprava indexů pomocí skriptu v SQL Server
DECLARE @TablesToMaintenance AS TABLE
(
DB_Schema VARCHAR(255),
DB_Table VARCHAR(255),
DB_Index VARCHAR(255),
INDEX_Fragmentation FLOAT,
OperationToMaintenance VARCHAR(255)
)
-----------Příprava fragmentovaných tabulek----
INSERT INTO @TablesToMaintenance(
@knedle
knedle / pokemon-go-pokemon-list-with-both-stab.csv
Last active November 22, 2016 15:16
List of Pokemons with both same attack type with STAB bonus #pokemonGo
pokemon name types quick attack qa dps charge attack cha dps BAM formula generation MEG1 MEG2
Normal
Rattata Normal Quick Attack Normal 10 9,4 Body Slam Normal 40 24,3 no 228,42 gen 1 no
Rattata Normal Quick Attack Normal 10 9,4 Hyper Fang Normal 35 16,8 no 157,92 gen 1 no
Rattata Normal Tackle Normal 12 13,6 Body Slam Normal 40 24,3 yes 330,48 gen 1 no
Rattata Normal Tackle Normal 12 13,6 Hyper Fang Normal 35 16,8 no 228,48 gen 1 no
Raticate Normal Quick Attack Normal 10 9,4 Hyper Beam Normal 120 27,3 no 256,62 gen 1 yes
Raticate Normal Quick Attack Normal 10 9,4 Hyper Fang Normal 35 16,8 no 157,92 gen 1 yes
Jigglypuff Normal Fairy Pound Normal 7 16,2 Body Slam Normal 40 24,3 yes 393,66 gen 1 no
Wigglytuff Normal Fairy Pound Normal 7 16,2 Hyper Beam Normal 120 27,3 yes 442,26 gen 1 yes
@knedle
knedle / php fce dataLine()
Last active August 24, 2016 07:52
return text: data-line="filename-where-call-function:line-where-call-function"
/**
* vrati atribut data-line s cislem radku na kterem byla tato fce volana
* pro zobrazeni v html prvku
* @return string
*/
function dataLine() {
$out = '';
$trace = debug_backtrace();
// dump($trace);
if (!empty($trace) && isset($trace[0])) {
@knedle
knedle / trim nbsp.php
Created December 7, 2015 09:25
Trim/remove   with php
<?php
$str = trim($str, chr(0xC2).chr(0xA0));
@knedle
knedle / Logger.php
Last active November 26, 2015 14:51
class Logger
<?php
// $this->logger = new Logger();
// $this->logger->setLogFile('admin.log');
// $this->logger->setTextBefore('user: '.$this->getUser()->getIdentity()->username);
// $this->logger->log($log);
class Logger {
private $logFile = 'logfile.log';
@knedle
knedle / cron-delete-cache-db-dir.php
Created November 3, 2015 22:27
skript (pro cron) pro mazani cache db adresare nette
<?php
/**
* duvod - nette mi v db cache adresari u webu radiozurnalu udelalo 600k souboru s velikosti asi 1,7GB
* takze to potrebuju nejak promazavat (myslel jsem, ze si to nette osetruje samo...)
*/
$cacheDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'temp'. DIRECTORY_SEPARATOR . 'cache' ;
$dirContent = scandir ($cacheDir);
@knedle
knedle / js-jquery-confirm
Created December 14, 2013 23:14
JS jQuery - auto .confirm dialog
// <a href="3" class="confirm" data-confirm="Realy detete this item?">Delete Item</a>
$(document).on('click', '.confirm', function() {
var text = '';
if ($(this).attr('data-confirm')) {
text = $(this).attr('data-confirm');
}
if (text.length == 0) {
text = 'Really take this action?';
}
var answer = confirm(text);