Skip to content

Instantly share code, notes, and snippets.

View SmetDenis's full-sized avatar
🏠
Working at home

Denis Smet SmetDenis

🏠
Working at home
View GitHub Profile
#!/usr/bin/env sh
#######################################################################
assert () # If condition false,
{ #+ exit from script
#+ with appropriate error message.
E_PARAM_ERR=98
E_ASSERT_FAILED=99
@SmetDenis
SmetDenis / remove_win_10_updates.bat
Created March 23, 2016 17:51
Remove Windows 10 updates script
wusa /uninstall /kb:2952664 /norestart /quiet
wusa /uninstall /kb:2976978 /norestart /quiet
wusa /uninstall /kb:2977759 /norestart /quiet
wusa /uninstall /kb:2990214 /norestart /quiet
wusa /uninstall /kb:3021917 /norestart /quiet
wusa /uninstall /kb:3022345 /norestart /quiet
wusa /uninstall /kb:3035583 /norestart /quiet
wusa /uninstall /kb:3044374 /norestart /quiet
wusa /uninstall /kb:3068708 /norestart /quiet
wusa /uninstall /kb:3075249 /norestart /quiet
@SmetDenis
SmetDenis / flash-to-pc.bat
Created March 23, 2016 17:49
flash and pc sync (manual)
@ECHO OFF
setlocal
:PROMPT
SET /P AREYOUSURE=Copy to PC? (PC/[N])?
IF /I "%AREYOUSURE%" NEQ "PC" GOTO END
DEL c:\vhd\work_old.vhd
REN c:\vhd\work.vhd work_old.vhd
@SmetDenis
SmetDenis / ignores.php
Last active October 9, 2020 14:00
Ignores for PHP inspections
<?php
// https://pear.php.net/manual/en/package.php.php-codesniffer.advanced-usage.php
// @codingStandardsIgnoreLine
// @codingStandardsIgnoreFile
// @codingStandardsIgnoreStart
// @codingStandardsIgnoreEnd
// https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.codeCoverageIgnore
// @codeCoverageIgnore
@SmetDenis
SmetDenis / merge.php
Created March 18, 2016 09:54
merge phpunit cover.php
<?php
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
require_once './vendor/autoload.php';
$finder = new Finder();
<?php
/**
* JBZoo App is universal Joomla CCK, application for YooTheme Zoo component
* @package jbzoo
* @version 2.x Pro
* @author JBZoo App http://jbzoo.com
* @copyright Copyright (C) JBZoo.com, All rights reserved.
* @license http://jbzoo.com/license-pro.php JBZoo Licence
* @coder Denis Smetannikov <denis@jbzoo.com>
*/
@SmetDenis
SmetDenis / i-miss-you.js
Created October 1, 2015 11:06
"I miss you" on tab if it's not active
var Z63 = Z63 || {};
Z63.ChangePageTitle = function (e) {
"use strict";
var t = {}, n, r;
t.init = function (e) {
n = e.title;
r = e.originalTitle;
t.listenToChange()
};
t.listenToChange = function () {
<?php
// no cache
if (!headers_sent()) {
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
}
@SmetDenis
SmetDenis / install.sh
Last active August 29, 2015 14:27 — forked from Naouak/install.sh
Joomla Extension installation with command line
#!/bin/sh
# Joomla extension auto installation
# Use that for development purpose, don't ever think of using it on a production website.
# The developer of that script won't endorse any problem you may encounter by using this script: Use it at your own risk!
# Please configure the three first params before using it.
# Usage :
# ./install.sh
# Will try to install every dir in the current dir
# ./install.sh directory
<?php
/**
* @param string $input
* @return mixed|string
*/
function CamelCase2Human($input)
{
$original = $input;