Skip to content

Instantly share code, notes, and snippets.

Jiří Petruželka NoxArt

Block or report user

Report or block NoxArt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View noxart.reactivity.schema-latest.json
{
"title": "NoxArt.Reactivity.AutomationDefinition",
"description": "Definition of automation task for NoxArt.Reactivity",
"type": "object",
"properties": {
"Title": {
"description": "Name of the definition for UI/logging purposes",
"type": "string",
"minLength": 1
},
@NoxArt
NoxArt / gist:59c5be36b01d6fcde21247c3a9f4ef48
Created Feb 25, 2018
KanColle Kc3Kai Ship lock show levels sciptlet
View gist:59c5be36b01d6fcde21247c3a9f4ef48
javascript:(function(){ $(".lship").each(function(){ var self = $(this); if( self.find(".ship-level").length ) { return; } var title = self.attr("title"); var level = parseInt(title ? title.match(/Lv\.(\d+)/)[1] : "0"); if( level == 0 ) { var levelSubelement = self.find(".ship_lv"); if( levelSubelement.length ) { level = parseInt(levelSubelement.text()); } } var levelElement = $("<div class='ship-level'/>").text(level); self.append(levelElement); }); if( $("#shipLevelStyles").length ) { return; } var styles = ".lship { overflow: visible !important; position: relative } " + ".ship-level { " + "content: attr(data-ship-level); padding: 1px 3px 0; color: white; background-color: rgb(180,40,0); border-radius: 4px; opacity: 0.8; " + "bottom: -3px; left: 50%; margin-left: -16px; position: absolute; " + "text-align: center; line-height: 1; text-shadow: 1px 1px 0 rgba(0,0,0,0.5); z-index: 1000; font-size: 65% " + "}"; var style = $("<style id='shipLevelStyles' />").text(styles); $("body").append(style); }())
@NoxArt
NoxArt / restore-menu-scroll.php
Last active Jan 21, 2018
AdminerRestoreMenuScroll plugin for Adminer
View restore-menu-scroll.php
<?php
/** Remembers and restores scollbar position of side menu
* @author Jiří @NoxArt Petruželka, www.noxart.cz
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerRestoreMenuScroll {
protected $script;
@NoxArt
NoxArt / Keys.php
Created Nov 9, 2012
WebDriver key codes
View Keys.php
<?php
class Keys {
const KEY_NULL = "\xEE\x80\x80";
const KEY_CANCEL = "\xEE\x80\x81";
const KEY_HELP = "\xEE\x80\x82";
const KEY_BACKSPACE = "\xEE\x80\x83";
const KEY_TAB = "\xEE\x80\x84";
const KEY_CLEAR = "\xEE\x80\x85";
const KEY_RETURN = "\xEE\x80\x86";
const KEY_ENTER = "\xEE\x80\x87";
@NoxArt
NoxArt / gist:2692147
Created May 14, 2012
JavaScript Undo/Redo
View gist:2692147
###
Class managing undo/redo
###
class History
###
Properties
@actions [{name(string), identifier(string), undo(callback), redo(callback)}]
@current pointer to a current point in history list, all the lower is history and all the higher ones are future
@NoxArt
NoxArt / BasePresenter.php
Created Mar 21, 2012 — forked from vojtech-dobes/BasePresenter.php
Annotation support for multiplied Nette components
View BasePresenter.php
<?php
use Nette\Application\UI;
use Nette\Reflection\Method;
class BasePresenter extends UI\Presenter
{
/** @var array datasets for Multipliers */
@NoxArt
NoxArt / gist:1883493
Created Feb 22, 2012
Nette - expose more parameters to config
View gist:1883493
<?php
namespace Tacnayn\Config;
use Nette;
class Configurator extends Nette\Config\Configurator {
protected function getDefaultParameters()
{
$parameters = parent::getDefaultParameters();
@NoxArt
NoxArt / Latte.tmLanguage.xml
Created Feb 4, 2012 — forked from xxxObiWan/Latte.tmLanguage.xml
Latte syntax definition for Sublime Text 2 [#nettefw #latte #php]
View Latte.tmLanguage.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--
- @author Michal Mikoláš <nanuqcz@gmail.com>
- @author Jiri Petruzelka <petruzelka@nox-art.cz>
- @license CC BY <http://creativecommons.org/licenses/by/3.0/cz/>
-->
<dict>
<key>fileTypes</key>
@NoxArt
NoxArt / beholder.cpp
Created Jan 16, 2012
Script to launch given shell command on directory/file change
View beholder.cpp
/**
* Beholder
*
* @author Jiri "NoxArt" Petruzelka | www.noxart.cz | petruzelka@nox-art.cz
* @author Microsoft
*
* @filesource
*
* @link http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx
*/
@NoxArt
NoxArt / string.php
Created Jan 15, 2012 — forked from knyttl/string.php
Maite\String
View string.php
<?php
namespace Maite;
class String {
/** @var string */
protected static $classInjection = 'Maite\Utils\Strings';
/** @var string */
You can’t perform that action at this time.