Skip to content

Instantly share code, notes, and snippets.

javascript: function labelAttacks() {
var arrInputs = document.getElementsByTagName('input');
var txtAttack = "Útok";
var strDate = document.getElementById('serverDate').childNodes[0].nodeValue;
strDate = strDate.substring(0, strDate.length - 5);
var strTime = document.getElementById('serverTime').childNodes[0].nodeValue;
var j = 0;
jmeno = '[' + strDate + ' ' + strTime + ']';
$("#incomings_table tr:gt(0)").each(function () {
if($(this).find(":contains('"+txtAttack+"')")){
<?php
ob_start(function($s, $flag) {
if ($flag & PHP_OUTPUT_HANDLER_START) {
$e = new \Exception;
$s = nl2br("Output started here:\n{$e->getTraceAsString()}\n\n") . $s;
}
return $s;
}, 2);
# ============================================================
# PluginName v0.0.0
# http://URL
# ============================================================
# Copyright 2012 The Beans Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
error_log syslog:server=unix:/var/log/nginx.sock;
http {
log_format verbose '$remote_addr - $remote_user $host "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
map $status $loggable {
~^[2] 0;
default 1;
}
@MelkorNemesis
MelkorNemesis / ControlMultiplier.php
Created November 26, 2011 15:15 — forked from fprochazka/ControlMultiplier.php
Ajax friendly ControlMultiplier
<?php
/**
* Component multiplier.
*/
class ControlMultiplier extends Nette\Application\UI\Control
{
/** @var Nette\Callback */
private $factory;
<?php
public static function renderSnippets($control, $local, $params)
{
$control->snippetMode = FALSE;
$payload = $control->getPresenter()->getPayload();
if (isset($local->blocks)) {
foreach ($local->blocks as $name => $function) {
if ($name[0] !== '_' || !$control->isControlInvalid(substr($name, 1))) {
continue;
}
<?php
$data = '+11234567890';
if( preg_match( '/^\+\d(\d{3})(\d{3})(\d{3})$/', $data, $matches ) )
{
$result = $matches[1] . ' ' .$matches[2] . ' ' . $matches[3];
return $result;
}
@MelkorNemesis
MelkorNemesis / ReactJS-Server-Side-Rendering.md
Created September 30, 2015 09:17 — forked from koistya/ReactJS-Server-Side-Rendering.md
Server-side Rendering (SSR) for ReactJS / Flux Applications. Setting document.title

Files

The basic structure of a React+Flux application (see other examples)

 - /src/actions/AppActions.js     - Action creators (Flux)
 - /src/components/Application.js - The top-level React component
 - /src/constants/ActionTypes.js  - Action types (Flux)
 - /src/core/Dispatcher.js        - Dispatcher (Flux)
 - /src/stores/AppStore.js        - The main store (Flux)
@MelkorNemesis
MelkorNemesis / omo.html
Created February 20, 2012 19:13
Instant Search Results nadpis
<nav>
<ul id="navigation">...</ul>
<!-- NOVE <div id="instant-search-header">Instant Search Results</div> -->
</nav>
<style type="text/css">
#instant-search-header {
position: absolute;