Skip to content

Instantly share code, notes, and snippets.

View Artistan's full-sized avatar

Charles Peterson Artistan

View GitHub Profile
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
@Artistan
Artistan / .bash_profile
Created November 15, 2013 21:48
bash_profile settings
# USE cg img; // will show 2 lines before and 15 lines after match.
alias cg="find . -path '*/.svn/*' -prune -o -path '*/.git/*' -prune -o -path '*compiled*' -prune -o -type f -print | xargs -e grep -A 15 -B 2 --color -rnisIe "
# USE f img;
alias f="find . -path '*/.svn/*' -prune -o -path '*/.git/*' -prune -o -path '*compiled*' -prune -o -type f -print | xargs -e grep --color -rnisIe "
@Artistan
Artistan / find_and_replace.sh
Created November 15, 2013 21:50
find and replace
f 'findthistext' | xargs sed -i -e 's/findthistext/replacewiththistext/g';
# replace members/upload.php with upload.php
f 'members\/upload\.php' | xargs sed -i -e 's/members\/upload\.php/upload\.php/g';
# using my .bash_profile
# prevents changes to .svn and .git files!!!
f 'findthistext' | xargs sed -i -e 's/findthistext/replacewiththistext/g';
@Artistan
Artistan / pagination.twig
Created March 13, 2014 02:49
Pagination
{#
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_provider_domains.txt
Last active June 7, 2024 16:22 — forked from tbrianjones/free_email_provider_domains.txt
text/csv list of free email domains
rambler.ru
naver.com
hitmail.com
rxdoc.biz
cox.com
126.net
126.com
comast.com
comast.net
yandex.com
@Artistan
Artistan / free-email-domains.php
Last active June 7, 2024 16:31
Php array list of free email domains
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 / lessWatch.sh
Created April 17, 2014 11:35
less compile
#!/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 / main.less.sh
Created April 17, 2014 11:37
main.css less compiler
#!/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;
@Artistan
Artistan / dabblet.css
Created February 21, 2015 19:40
Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
/**
* 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 February 21, 2015 19:40
Generate repeating hexagonal pattern with CSS3 (SO) - 1 element/ hexagon !!!
/**
* 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;