Skip to content

Instantly share code, notes, and snippets.

View Ticolyle's full-sized avatar

Lyle Ticolyle

View GitHub Profile
@Ticolyle
Ticolyle / .bash_profile
Created October 14, 2015 01:54 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@Ticolyle
Ticolyle / simple_ftp_put.php
Created April 21, 2015 00:35
Simple ftp_put with echo feedback for php uploads
echo '<h1>Attempting connection...</h1>';
$f_date = date('Ymd', time());
$ftp_server = "";
$ftp_user_name = "";
$ftp_user_pass = "";
$file = "test.txt";
$remote_file = "test_uploaded.txt";
@Ticolyle
Ticolyle / smalt-spam-block
Created January 26, 2015 15:54
.htaccess rule to block annoying Smalt spambot from analytigs
# Block annoying spambot
# -----------------------------------------------------------------------------
SetEnvIfNoCase Referer semalt.com spambot=yes
Order allow,deny
Allow from all
Deny from env=spambot
@Ticolyle
Ticolyle / pure-dropdown.js
Created January 19, 2015 16:16
Adding a custom Dropdown Menu to Yahoo Pure CSS Library to fill the gap that YUI left. http://pixabay.com/en/blog/posts/how-to-use-pure-dropdown-menus-with-jquery-instead-56/
var pure_menu;
if ('ontouchstart' in window) {
$('.pure-dropdown>a').click(function(e) {
pure_menu = $(this).parent();
var sub = pure_menu.toggleClass('pure-menu-open').find('.pure-menu-children').css('top', pure_menu.height());
if (pure_menu.offset().left + sub.outerWidth() > $(window).width() && $(window).width() > sub.outerWidth())
sub.css('left', pure_menu.width() - sub.outerWidth());
else
sub.css('left', 0);
return false;
@Ticolyle
Ticolyle / Upgrading from 1.x.md
Created January 7, 2015 15:52
ExpressionEngine (EE) upgrade and maintenance notes

To update channel entry nGen File Fields to Native Files after upgrade process:

UPDATE exp_channel_data
SET field_id_XX = CONCAT('{filedir_YY}', field_id_XX)
WHERE field_id_XX != ''
AND field_id_XX NOT LIKE '{filedir_%'

XX = The field ID to update ( same as ID in control panel, a column name in the SQL table ) YY = The id of the file upload directory form the File Manager

@Ticolyle
Ticolyle / SVG_tips.md
Last active August 29, 2015 14:11
Some tips and steps for exporting Illustrator vector shape files to SVG for the web.

Exporing SVG for web from Illustrator

How to save files from Adobe Illustrator to SVG for web production use. Goals:

  • Maintin Usable Groups and Naming
  • Package for responsive use
  • Reduce File Size

Preferences & Artboard

Set units to pixels and use RGB color (CSS does not support CMYK).

@Ticolyle
Ticolyle / gist:f161e9c17d1aaf69d00c
Created December 9, 2014 22:46
Allow CORS requests...form the same domain
SetEnvIf Origin "^(.*\.?nyi\.net)$" ORIGIN_SUB_DOMAIN=$1
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
</IfModule>
http://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains
<div itemscope itemtype="http://schema.org/HealthAndBeautyBusiness">
<meta itemprop="name" content="<!-- -->" />
<meta itemprop="founder" content="<!-- -->" />
<a href="<!-- -->" itemprop="url"></a>
<a href="mailto:<!-- -->" itemprop="email"></a>
<a href="<!-- -->" itemprop="logo"></a>
<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="<!-- -->" />
<meta itemprop="longitude" content="<!-- -->" />
</div>
@Ticolyle
Ticolyle / gist:c1303f81077e6aa51ccc
Created September 26, 2014 16:03
jquery.smoothscroll
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='160 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>