Skip to content

Instantly share code, notes, and snippets.

View Realetive's full-sized avatar

Realetive Realetive

View GitHub Profile
@Realetive
Realetive / night_install.sh
Last active August 29, 2015 13:57
Full clear MODx autoinstaller last nightlies version from official GitHub repo (https://github.com/modxcms/revolution) with create user, database, nginx's virtual host.
#!/bin/bash
##############
echo "Welcome to MODx autoinstaller.
------------------------------------
Enter MySQL root password"
read ROOTPASS
echo "Enter username for site and database"
#!/bin/bash
##############
echo "Welcome to MODx autoinstaller.
Enter MySQL root password"
read ROOTPASS
echo "Enter username for site and database"
@Realetive
Realetive / secure_install.sh
Last active February 27, 2018 18:20
Advanced installation MODx from GitHub with rename and move core outward the webroot, rename manager and connectors
#!/bin/bash
##############
echo "
//////////////////////////////////////
// //
// Welcome to MODx autoinstaller. //
// //
//////////////////////////////////////
@Realetive
Realetive / affiliator.php
Created October 13, 2014 09:56
simple test
<?php
/**
* Created by PhpStorm.
* User: Realetive
* Date: 13.10.14
* Time: 9:49
*/
$group_city = [
'spb' => [
<?php
/**
* CercecUser
*
* @author Marc Elie <[email protected]>
*
* Event: OnUserFormSave
*
* Modified from Bob Ray's plugin tutorial, Official Guide p. 492-3
* and Bob Ray's online explanation on create class:
@Realetive
Realetive / gist:7d3ce35881fea9d1adf4
Created February 28, 2015 03:13
MODX букмарклет для добавления нового репозитория (Simple Dream)
javascript:(function(){
if (typeof MODx != 'undefined' && typeof MODx.load != 'undefined') {
var action = (MODx.action) ? MODx.action['workspaces'] : 'workspaces';
if (action == MODx.request.a) {
var providerName = prompt('Пожалуйста, обязательно введите название поставщика пакетов (по умолчанию: Simple Dream)', 'Simple Dream')
, providerURL = prompt('Адрес магазина (тоже обязательно)', 'http://modstore.pro/extras/')
, userName = prompt('Имя пользователя', '')
, userKey = prompt('Ключ', '')
, desc = prompt('Описание', 'Магазин дополнений Simple Dream')
, win = MODx.load({
<?php
/*
Output filter to retrieve names of TVs from a list of TV ids
[email protected]
Idea:
Use it with toogleTVSet plugin (included below) to handel different template options.
Usage:
@Realetive
Realetive / audio.css
Created March 7, 2015 23:56
Styles for HTML5 audio
audio {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
}
audio {
width: 100%;
}
@Realetive
Realetive / media_queries.less
Last active August 29, 2015 14:17
Twitter Bootstrap media queries cheatsheet
/* Only extra small devices (phones, until 767px) */
@media (max-width: @screen-xs-max) {
/* … */
}
/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm-min) {
/* … */
}
@Realetive
Realetive / affix.html
Last active August 29, 2015 14:17 — forked from Cezarion/affix.html
<script type="text/javascript">
window.onscroll = scroll;
function scroll () {
var scrollTop = window.pageYOffset;
console.log(scrollTop);
if( scrollTop > 363 ){
document.getElementById('summary').style.top="20px";
document.getElementById('summary').style.position="fixed";
}
else