Skip to content

Instantly share code, notes, and snippets.

Charles Peterson Artistan

Block or report user

Report or block Artistan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pagination.twig
{#
You need the following variables:
paginationCurrentFilters: an associative array that contains the current settings of the page like search, filters, etc. For example {% set paginationCurrentFilters = { ‘search’: search, ‘filter_by_is_active’: filter_by_is_active } %}, so it can be easy for us to merge the pagination with these filters.
paginationCurrentPage : the current page you are in
paginationRouteName : the route name of the path that paginates files
paginationTotal : The paginationTotal number of pages (ceil(found_entities/items_per_page))
paginationLastPage : represents the paginationTotal number of existing pages
paginationExtremePagesLimit : the number of first and last pages to be displayed
paginationNearbyPagesLimit : the number of pages that are displayed around the active page
@Artistan
Artistan / free-email-domains.php
Last active Aug 29, 2015
Php array list of free email domains
View free-email-domains.php
return ['free'=>['hitmail.com','rxdoc.biz','cox.com','126.net','126.com','comast.com','comast.net','yandex.com','wegas.ru','twc.com','charter.com','outlook.com','gmx.com','.ddns.org','.findhere.com','.freeservers.com','.zzn.com','1033edge.com','11mail.com','123.com','123box.net','123india.com','123mail.cl','123qwe.co.uk','150ml.com','15meg4free.com','163.com','1coolplace.com','1freeemail.com','1funplace.com','1internetdrive.com','1mail.net','1me.net','1mum.com','1musicrow.com','1netdrive.com','1nsyncfan.com','1under.com','1webave.com','1webhighway.com','212.com','24horas.com','2911.net','2bmail.co.uk','2d2i.com','2die4.com','3000.it','321media.com','37.com','3ammagazine.com','3dmail.com','3email.com','3xl.net','444.net','4email.com','4email.net','4mg.com','4newyork.com','4x4man.com','5iron.com','5star.com','88.am','8848.net','888.nu','97rock.com','aaamail.zzn.com','aamail.net','aaronkwok.net','abbeyroadlondon.co.uk','abcflash.net','abdulnour.com','aberystwyth.com','abolition-now.com','about.com','academycouga
@Artistan
Artistan / main.less.sh
Created Apr 17, 2014
main.css less compiler
View main.less.sh
#!/bin/bash
while true;
do N=`find -name "*.less" `;
inotifywait -qe modify $N ;
for f in $N;
do lessc main.less main.css;
done;
done;
View lessWatch.sh
#!/bin/bash
while true;
do N=`find -name "*.less" `;
inotifywait -qe modify $N ;
for f in $N;
do lessc $f ${f%.*}.css;
done;
done;
@Artistan
Artistan / dabblet.css
Created Feb 21, 2015
Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
View dabblet.css
/**
* Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
* http://stackoverflow.com/q/10062887/1397351
*/
* { box-sizing: border-box; margin: 0; padding: 0; }
.row { margin: -18.5% 0; text-align: center; }
.row:first-child { margin-top: 2.25%; }
.hexagon {
position: relative;
display: inline-block;
@Artistan
Artistan / dabblet.css
Created Feb 21, 2015
Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
View dabblet.css
/**
* Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
* http://stackoverflow.com/q/10062887/1397351
*/
* { box-sizing: border-box; margin: 0; padding: 0; }
.row { margin: -18.5% 0; text-align: center; }
.row:first-child { margin-top: 2.25%; }
.hexagon {
position: relative;
display: inline-block;
@Artistan
Artistan / dabblet.css
Last active Aug 29, 2015
Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
View dabblet.css
/**
* Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
* http://stackoverflow.com/q/10062887/1397351
*/
* { box-sizing: border-box; margin: 0; padding: 0; }
.row:first-child { margin-top: 0%; }
.hexagon {
position: relative;
display: inline-block;
overflow: hidden;
View readme.md

Installing ELK (CentOS)

This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.

I. Install JDK

rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
View readme.md

Installing ELK (CentOS)

This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.

I. Install JDK

rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
@Artistan
Artistan / vpnsetup.sh
Last active Aug 29, 2015 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8 & 7
View vpnsetup.sh
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server
# on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 & 7.
# With minor modifications, this script *can also be used* on dedicated servers
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers.
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#
You can’t perform that action at this time.