This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Path | |
result=${PWD##*/} | |
# Current date | |
now=$(date +"%d_%m_%Y") | |
machine=$(hostname) | |
# Database credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
grunt.initConfig({ | |
/** | |
* Prepare banner. | |
* This will be used as header for generated files. | |
*/ | |
pkg: grunt.file.readJSON('package.json'), | |
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> ' + '<%= grunt.template.today("yyyy-mm-dd h:MM:ss") %>' + '*/' + "\n", | |
/* Minify html */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var array $params Current get params without c **/ | |
$params = $_GET; | |
unset( $params[ 'c' ] ); | |
/** @var string $url **/ | |
$url = Yii::app()->controller->createUrl( Yii::app()->controller->id . '/' . Yii::app()->controller->action->id, $params ); | |
/** | |
* Create form with nedded c param included. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.glitchMode = function() { | |
var glitches = { | |
/** | |
* Random color | |
*/ | |
color: function(e) { | |
var color ='#'+Math.random().toString(16).substr(2,6); | |
e.css('color', color ); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$config = [ | |
'components' => [ | |
'view' => [ | |
'on afterRender' => function ($event) { | |
// Check if this is not a layout file | |
if( preg_match( '/layouts/', $event->viewFile ) == 0 ) { | |
/** | |
* Add template info. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, root, undefined) { | |
/** | |
* Onready – fire when DOM is ready | |
*/ | |
$(function () { | |
'use strict'; | |
// say hello | |
console.log('Hello, Want to hire me? Go to: http://realhe.ro'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Global config (always uncommented) | |
$PG_BIN = "C:\Program Files\PostgreSQL\9.6\bin\pg_dump.exe" | |
$PG_HOST=$env:COMPUTERNAME | |
$PG_PORT=5432 | |
$PG_PATH="C:\inetpub\temporary_backups" | |
$ZIP_BIN="C:\Program Files\7-Zip\7z.exe" | |
#---------------------------------------- | |
#Database config for (uncomment if manual use) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Based on https://matomo.org/docs/log-analytics-tool-how-to/ | |
:: Global config | |
:: Python URL (must be 2.x) | |
SET PY_BIN=C:\Program Files\Python\Python27\python.exe | |
:: Matomo import_logs executable | |
SET IMPORT_LOGS=C:\inetpub\htdocs\piwik\misc\log-analytics\import_logs.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Based on https://matomo.org/docs/log-analytics-tool-how-to/ | |
:: Global config | |
SET PY_BIN=C:\Program Files\Python\Python27\python.exe | |
SET IMPORT_LOGS=[path to matomo]\piwik\misc\log-analytics\import_logs.py | |
SET LOGS_DIR=C:\inetpub\logs\LogFiles | |
SET TOKEN=**************************** | |
SET URL=http://website.com/piwik/ | |
SET THREADS=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Force HTTPS" stopProcessing="true"> | |
<match url="^(.*)$" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{HTTPS}" pattern="^OFF$" /> | |
</conditions> |