Skip to content

Instantly share code, notes, and snippets.

View eSlider's full-sized avatar
🏠
Working from home

Andriy Oblivantsev eSlider

🏠
Working from home
View GitHub Profile
<?php
namespace Mapbender\ConfiguratorBundle\Controller;
use FOM\ManagerBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/**
* Mapbender application management
*
* @Route("configurator/")
@eSlider
eSlider / field-constrains.yaml
Created September 27, 2016 07:27
Feature types definition
oprators:
numeric: ['<','>','==']
boolean: ['<>','==']
date: ['bettwen','==','<','>']
string: ['LIKE','NOT LIKE', 'RLIKE', 'LLIKE']
featureTypes:
- id: 1
name: IPE
table: ipe
@eSlider
eSlider / xml-translations-to-yaml.php
Created May 24, 2016 15:02
Converts XML translations to YAML
<?php
require "../vendor/autoload.php";
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\Yaml\Yaml;
use Wheregroup\XML\Util\Parser as XMLParser;
$finder = new Finder();
$finder->files()->in("../mapbender/src/Mapbender/ManagerBundle/Resources/translations");
@eSlider
eSlider / Power.java
Created May 16, 2016 18:32
Power.java
import java.util.Scanner;
import java.util.InputMismatchException;
public class Power
{
public static int hoch(int x, int y)
{
int result;
if ( y > 0 ) {
result = x * hoch(x, y-1);
<?php //version pg202
//set allowTestMenu to false to disable System/Server test page
$allowTestMenu = true;
header("Content-Type: text/plain; charset=x-user-defined");
error_reporting(0);
set_time_limit(0);
function phpversion_int()
echo Telemetry
wusa /uninstall /kb:3012973 /quiet /norestart
wusa /uninstall /kb:3068708 /quiet /norestart
wusa /uninstall /kb:3022345 /quiet /norestart
wusa /uninstall /kb:3075249 /quiet /norestart
wusa /uninstall /kb:3080149 /quiet /norestart
wusa /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3044374 (Get Windows 10 for Win8.1)
start /w wusa.exe /uninstall /kb:3044374 /quiet /norestart
echo Telemetry
wusa /uninstall /kb:3012973 /quiet /norestart
wusa /uninstall /kb:3068708 /quiet /norestart
wusa /uninstall /kb:3022345 /quiet /norestart
wusa /uninstall /kb:3075249 /quiet /norestart
wusa /uninstall /kb:3080149 /quiet /norestart
wusa /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3044374 (Get Windows 10 for Win8.1)
start /w wusa.exe /uninstall /kb:3044374 /quiet /norestart
@eSlider
eSlider / remove_crw.cmd
Created December 6, 2015 13:59 — forked from xvitaly/remove_crw.cmd
Remove telemetry updates for Windows 7 and 8.1
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
start /w wusa.exe /uninstall /kb:3068708 /quiet /norestart
@eSlider
eSlider / ProgressExampleCommand.php
Last active October 16, 2015 08:35
Progress example command
<?php
/** @var ProgressHelper $progress */
$progress = clone $this->getHelper('progress');
$progress->setFormat(' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%');
$progress->setBarCharacter('<info>∎</info>');
$progress->setEmptyBarCharacter(' ');
$progress->setBarWidth(100);
$progress->setProgressCharacter("∎");
$count = rand(0, 1000);
@eSlider
eSlider / SolrConfig.php
Last active October 16, 2015 08:17
Generate postGIS transformation SQL
<?php
/**
* Generate an transformation SQL to WKT geometry.
*
* @param string $geomName Geom field name
* @param string $transformSrid Transforms to SRID. Optional. Default = null.
* @param string $sqlAlias SQL alias name. Optional. Default = null.
* @param bool $force2d Forces the geometries into a "2-dimensional mode" so that all output
* representations will only have the X and Y coordinates. Optional. Default = false.