Skip to content

Instantly share code, notes, and snippets.

View vrusua's full-sized avatar
🇺🇦

Ruslan Voroshchuk vrusua

🇺🇦
View GitHub Profile
@vrusua
vrusua / config.php
Last active August 29, 2015 14:16 — forked from BenParizek/config.php
<?php
/**************************************************
Custom configuration bootstrap file for ExpressionEngine
1) Place config.php above site root
2) Require this bootstrap file at the bottom of the config and database files:
system/expressionengine/config/config.php
Example: require(realpath(dirname(__FILE__) . '/../../../config.php'));
@vrusua
vrusua / #dev_snippets.md
Last active August 29, 2015 14:21
some useful snippets
                        ### SNIPPETS ###

#patterns More-or-Less Mixins

LESS mixins + + + + + + + site source

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)

#!/bin/bash
# File: exp_permissions.sh
# Description: Sets permssions on a ExpressionEngine 2 install
#
# Copyright 2010 George Ornbo (Shape Shed)
#
# 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
#
@vrusua
vrusua / low-search-ajax.js
Last active August 29, 2015 14:27 — forked from low/low-search-ajax.js
Using Low Search for ExpressionEngine with Ajax. Change any of the three variables on top to suit your needs. Tested with jQuery 1.9.0.
(function($){
$(function(){
var $form = $('#search'), // Search form
$target = $('#results'), // Results container
rp = 'search/ajax-results'; // Template for results only
// Function to execute on success
var success = function(data, status, xhr) {
$target.html(data);
};
@vrusua
vrusua / template.html
Created December 1, 2013 03:30 — forked from tinabeans/template.html
#template single-column responsive email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@vrusua
vrusua / backup.php
Created August 22, 2016 06:48 — forked from toddsby/backup.php
backup.php
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu
* contribution: Drew Toddsby
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit','1024M');
@vrusua
vrusua / nginx.conf
Created February 7, 2018 10:18 — forked from mreschke/nginx.conf
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
@vrusua
vrusua / digitalocean-centos-wordpress.sh
Created February 7, 2018 10:21 — forked from reitermarkus/digitalocean-centos-wordpress.sh
Install WordPress on DigitalOcean CentOS Droplet with PHP 7
#!/bin/sh
DATABASE_NAME='wordpress'
DATABASE_USER='wordpress'
ROOT_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev`
WORDPRESS_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev`
# Write Passwords to File.
@vrusua
vrusua / digitalocean-centos-wordpress.sh
Created February 7, 2018 10:21 — forked from reitermarkus/digitalocean-centos-wordpress.sh
Install WordPress on DigitalOcean CentOS Droplet with PHP 7
#!/bin/sh
DATABASE_NAME='wordpress'
DATABASE_USER='wordpress'
ROOT_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev`
WORDPRESS_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev`
# Write Passwords to File.